Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
7043f05c
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7043f05c
编写于
1月 19, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
933f4cae
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
355 addition
and
392 deletion
+355
-392
build/three.js
build/three.js
+23
-41
build/three.min.js
build/three.min.js
+309
-310
build/three.module.js
build/three.module.js
+23
-41
未找到文件。
build/three.js
浏览文件 @
7043f05c
...
...
@@ -354,44 +354,6 @@
}(),
// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
arrayMin: function ( array ) {
var length = array.length, min = Infinity;
while ( length -- ) {
if ( array[ length ] < min ) {
min = array[ length ];
}
}
return min;
},
arrayMax: function ( array ) {
var length = array.length, max = - Infinity;
while ( length -- ) {
if ( array[ length ] > max ) {
max = array[ length ];
}
}
return max;
},
clamp: function ( value, min, max ) {
return Math.max( min, Math.min( max, value ) );
...
...
@@ -12431,6 +12393,26 @@
} );
// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
function arrayMax( array ) {
var length = array.length, max = - Infinity;
while ( length -- ) {
if ( array[ length ] > max ) {
max = array[ length ];
}
}
return max;
}
/**
* @author mrdoob / http://mrdoob.com/
* @author kile / http://kile.stravaganza.org/
...
...
@@ -13907,7 +13889,7 @@
if ( Array.isArray( index ) ) {
this.index = new (
_Math.
arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
} else {
...
...
@@ -14369,7 +14351,7 @@
if ( geometry.indices.length > 0 ) {
var TypeArray =
_Math.
arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
var indices = new TypeArray( geometry.indices.length * 3 );
this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
...
...
@@ -17658,7 +17640,7 @@
// console.timeEnd( 'wireframe' );
var attribute = new (
_Math.
arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
var attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
updateAttribute( attribute, gl.ELEMENT_ARRAY_BUFFER );
...
...
build/three.min.js
浏览文件 @
7043f05c
此差异已折叠。
点击以展开。
build/three.module.js
浏览文件 @
7043f05c
...
...
@@ -348,44 +348,6 @@ var _Math = {
}(),
// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
arrayMin: function ( array ) {
var length = array.length, min = Infinity;
while ( length -- ) {
if ( array[ length ] < min ) {
min = array[ length ];
}
}
return min;
},
arrayMax: function ( array ) {
var length = array.length, max = - Infinity;
while ( length -- ) {
if ( array[ length ] > max ) {
max = array[ length ];
}
}
return max;
},
clamp: function ( value, min, max ) {
return Math.max( min, Math.min( max, value ) );
...
...
@@ -12425,6 +12387,26 @@ Object.assign( DirectGeometry.prototype, {
} );
// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
function arrayMax( array ) {
var length = array.length, max = - Infinity;
while ( length -- ) {
if ( array[ length ] > max ) {
max = array[ length ];
}
}
return max;
}
/**
* @author mrdoob / http://mrdoob.com/
* @author kile / http://kile.stravaganza.org/
...
...
@@ -13901,7 +13883,7 @@ BufferGeometry.prototype = {
if ( Array.isArray( index ) ) {
this.index = new (
_Math.
arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
} else {
...
...
@@ -14363,7 +14345,7 @@ BufferGeometry.prototype = {
if ( geometry.indices.length > 0 ) {
var TypeArray =
_Math.
arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
var indices = new TypeArray( geometry.indices.length * 3 );
this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
...
...
@@ -17652,7 +17634,7 @@ function WebGLObjects( gl, properties, info ) {
// console.timeEnd( 'wireframe' );
var attribute = new (
_Math.
arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
var attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
updateAttribute( attribute, gl.ELEMENT_ARRAY_BUFFER );
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录