Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
0afa7a93
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 搜索 >>
提交
0afa7a93
编写于
1月 19, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replaced Math.max.apply( Max, ... ) with setIndexArray(). See #10603.
上级
a8b8af08
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
36 addition
and
40 deletion
+36
-40
examples/js/loaders/AssimpJSONLoader.js
examples/js/loaders/AssimpJSONLoader.js
+1
-1
examples/js/loaders/FBXLoader.js
examples/js/loaders/FBXLoader.js
+1
-9
examples/js/loaders/MMDLoader.js
examples/js/loaders/MMDLoader.js
+1
-1
examples/js/loaders/PLYLoader.js
examples/js/loaders/PLYLoader.js
+4
-1
src/core/BufferGeometry.js
src/core/BufferGeometry.js
+1
-1
src/geometries/BoxGeometry.js
src/geometries/BoxGeometry.js
+2
-2
src/geometries/CircleGeometry.js
src/geometries/CircleGeometry.js
+2
-2
src/geometries/CylinderGeometry.js
src/geometries/CylinderGeometry.js
+2
-2
src/geometries/LatheGeometry.js
src/geometries/LatheGeometry.js
+3
-3
src/geometries/ParametricGeometry.js
src/geometries/ParametricGeometry.js
+2
-2
src/geometries/PlaneGeometry.js
src/geometries/PlaneGeometry.js
+2
-2
src/geometries/RingGeometry.js
src/geometries/RingGeometry.js
+3
-3
src/geometries/ShapeGeometry.js
src/geometries/ShapeGeometry.js
+2
-2
src/geometries/SphereGeometry.js
src/geometries/SphereGeometry.js
+2
-2
src/geometries/TorusGeometry.js
src/geometries/TorusGeometry.js
+2
-2
src/geometries/TorusKnotGeometry.js
src/geometries/TorusKnotGeometry.js
+2
-2
src/geometries/TubeGeometry.js
src/geometries/TubeGeometry.js
+2
-2
src/renderers/webgl/WebGLObjects.js
src/renderers/webgl/WebGLObjects.js
+2
-1
未找到文件。
examples/js/loaders/AssimpJSONLoader.js
浏览文件 @
0afa7a93
...
...
@@ -125,7 +125,7 @@ THREE.AssimpJSONLoader.prototype = {
}
geometry
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
THREE
.
Uint32BufferAttribute
:
THREE
.
Uint16BufferAttribute
)(
indices
,
1
)
);
geometry
.
setIndex
Array
(
indices
);
geometry
.
addAttribute
(
'
position
'
,
new
THREE
.
Float32BufferAttribute
(
vertices
,
3
)
);
if
(
normals
.
length
>
0
)
{
...
...
examples/js/loaders/FBXLoader.js
浏览文件 @
0afa7a93
...
...
@@ -263,15 +263,7 @@
if
(
geoNode
.
indices
!==
undefined
&&
geoNode
.
indices
.
length
>
0
)
{
if
(
Math
.
max
.
apply
(
Math
,
geoNode
.
indices
)
>
65535
)
{
tmpGeo
.
setIndex
(
new
THREE
.
BufferAttribute
(
new
Uint32Array
(
geoNode
.
indices
),
1
)
);
}
else
{
tmpGeo
.
setIndex
(
new
THREE
.
BufferAttribute
(
new
Uint16Array
(
geoNode
.
indices
),
1
)
);
}
tmpGeo
.
setIndexArray
(
geoNode
.
indices
);
}
...
...
examples/js/loaders/MMDLoader.js
浏览文件 @
0afa7a93
...
...
@@ -1477,7 +1477,7 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress
var
initGeometry
=
function
()
{
geometry
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
buffer
.
indices
)
>
65535
?
THREE
.
Uint32BufferAttribute
:
THREE
.
Uint16BufferAttribute
)(
buffer
.
indices
,
1
)
);
geometry
.
setIndex
Array
(
buffer
.
indices
);
geometry
.
addAttribute
(
'
position
'
,
new
THREE
.
Float32BufferAttribute
(
buffer
.
vertices
,
3
)
);
geometry
.
addAttribute
(
'
normal
'
,
new
THREE
.
Float32BufferAttribute
(
buffer
.
normals
,
3
)
);
geometry
.
addAttribute
(
'
uv
'
,
new
THREE
.
Float32BufferAttribute
(
buffer
.
uvs
,
2
)
);
...
...
examples/js/loaders/PLYLoader.js
浏览文件 @
0afa7a93
...
...
@@ -313,8 +313,11 @@ THREE.PLYLoader.prototype = {
// mandatory buffer data
if
(
buffer
.
indices
.
length
>
0
)
{
geometry
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
buffer
.
indices
)
>
65535
?
THREE
.
Uint32BufferAttribute
:
THREE
.
Uint16BufferAttribute
)(
buffer
.
indices
,
1
)
);
geometry
.
setIndexArray
(
buffer
.
indices
);
}
geometry
.
addAttribute
(
'
position
'
,
new
THREE
.
Float32BufferAttribute
(
buffer
.
vertices
,
3
)
);
// optional buffer data
...
...
src/core/BufferGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -514,7 +514,7 @@ BufferGeometry.prototype = {
if
(
geometry
.
indices
.
length
>
0
)
{
var
TypeArray
=
Math
.
max
.
apply
(
Math
,
geometry
.
indices
)
>
65535
?
Uint32Array
:
Uint16Array
;
var
TypeArray
=
_Math
.
arrayMax
(
geometry
.
indices
)
>
65535
?
Uint32Array
:
Uint16Array
;
var
indices
=
new
TypeArray
(
geometry
.
indices
.
length
*
3
);
this
.
setIndex
(
new
BufferAttribute
(
indices
,
1
).
copyIndicesArray
(
geometry
.
indices
)
);
...
...
src/geometries/BoxGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -32,7 +32,7 @@ BoxGeometry.prototype.constructor = BoxGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
...
...
@@ -82,7 +82,7 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/CircleGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -29,7 +29,7 @@ CircleGeometry.prototype.constructor = CircleGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
...
...
@@ -106,7 +106,7 @@ function CircleBufferGeometry( radius, segments, thetaStart, thetaLength ) {
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/CylinderGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -33,7 +33,7 @@ CylinderGeometry.prototype.constructor = CylinderGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
...
...
@@ -96,7 +96,7 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/LatheGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -34,7 +34,7 @@ function LatheGeometry( points, segments, phiStart, phiLength ) {
LatheGeometry
.
prototype
=
Object
.
create
(
Geometry
.
prototype
);
LatheGeometry
.
prototype
.
constructor
=
LatheGeometry
;
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
...
...
@@ -62,7 +62,7 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
phiLength
=
phiLength
||
Math
.
PI
*
2
;
// clamp phiLength so it's in range of [ 0, 2PI ]
phiLength
=
_Math
.
clamp
(
phiLength
,
0
,
Math
.
PI
*
2
);
...
...
@@ -135,7 +135,7 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/ParametricGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -35,7 +35,7 @@ ParametricGeometry.prototype.constructor = ParametricGeometry;
*/
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
function
ParametricBufferGeometry
(
func
,
slices
,
stacks
)
{
...
...
@@ -100,7 +100,7 @@ function ParametricBufferGeometry( func, slices, stacks ) {
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/PlaneGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -32,7 +32,7 @@ PlaneGeometry.prototype.constructor = PlaneGeometry;
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
function
PlaneBufferGeometry
(
width
,
height
,
widthSegments
,
heightSegments
)
{
...
...
@@ -112,7 +112,7 @@ function PlaneBufferGeometry( width, height, widthSegments, heightSegments ) {
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/RingGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -30,7 +30,7 @@ RingGeometry.prototype.constructor = RingGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
...
...
@@ -97,7 +97,7 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
normals
.
push
(
0
,
0
,
1
);
// uv
uv
.
x
=
(
vertex
.
x
/
outerRadius
+
1
)
/
2
;
uv
.
y
=
(
vertex
.
y
/
outerRadius
+
1
)
/
2
;
...
...
@@ -137,7 +137,7 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/ShapeGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -35,7 +35,7 @@ ShapeGeometry.prototype.constructor = ShapeGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
ShapeUtils
}
from
'
../extras/ShapeUtils
'
;
...
...
@@ -87,7 +87,7 @@ function ShapeBufferGeometry( shapes, curveSegments ) {
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/SphereGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -32,7 +32,7 @@ SphereGeometry.prototype.constructor = SphereGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
...
...
@@ -137,7 +137,7 @@ function SphereBufferGeometry( radius, widthSegments, heightSegments, phiStart,
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/TorusGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -31,7 +31,7 @@ TorusGeometry.prototype.constructor = TorusGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
...
...
@@ -128,7 +128,7 @@ function TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/TorusKnotGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -34,7 +34,7 @@ TorusKnotGeometry.prototype.constructor = TorusKnotGeometry;
* see: http://www.blackpawn.com/texts/pqtorus/
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
...
...
@@ -166,7 +166,7 @@ function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments,
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/geometries/TubeGeometry.js
浏览文件 @
0afa7a93
...
...
@@ -48,7 +48,7 @@ TubeGeometry.prototype.constructor = TubeGeometry;
* @author Mugen87 / https://github.com/Mugen87
*/
import
{
Float32BufferAttribute
,
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
Float32BufferAttribute
}
from
'
../core/BufferAttribute
'
;
import
{
BufferGeometry
}
from
'
../core/BufferGeometry
'
;
import
{
Vector2
}
from
'
../math/Vector2
'
;
import
{
Vector3
}
from
'
../math/Vector3
'
;
...
...
@@ -101,7 +101,7 @@ function TubeBufferGeometry( path, tubularSegments, radius, radialSegments, clos
// build geometry
this
.
setIndex
(
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
)
);
this
.
setIndex
Array
(
indices
);
this
.
addAttribute
(
'
position
'
,
new
Float32BufferAttribute
(
vertices
,
3
)
);
this
.
addAttribute
(
'
normal
'
,
new
Float32BufferAttribute
(
normals
,
3
)
);
this
.
addAttribute
(
'
uv
'
,
new
Float32BufferAttribute
(
uvs
,
2
)
);
...
...
src/renderers/webgl/WebGLObjects.js
浏览文件 @
0afa7a93
...
...
@@ -3,6 +3,7 @@
*/
import
{
Uint16BufferAttribute
,
Uint32BufferAttribute
}
from
'
../../core/BufferAttribute
'
;
import
{
_Math
}
from
'
../../math/Math
'
;
import
{
WebGLGeometries
}
from
'
./WebGLGeometries
'
;
function
WebGLObjects
(
gl
,
properties
,
info
)
{
...
...
@@ -234,7 +235,7 @@ function WebGLObjects( gl, properties, info ) {
// console.timeEnd( 'wireframe' );
var
attribute
=
new
(
Math
.
max
.
apply
(
Math
,
indices
)
>
65535
?
Uint32BufferAttribute
:
Uint16BufferAttribute
)(
indices
,
1
);
var
attribute
=
new
(
_Math
.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录