提交 80d69bf3 编写于 作者: D dubejf

reorderBuffers: call ctor of typed array directly

Update to mrdoob/three.js#5262
上级 d935a878
......@@ -834,13 +834,7 @@ THREE.BufferGeometry.prototype = {
if ( attr == 'index' )
continue;
var sourceArray = this.attributes[ attr ].array;
for ( var i = 0, il = types.length; i < il; i ++ ) {
var type = types[ i ];
if ( sourceArray instanceof type ) {
sortedAttributes[ attr ] = new type( this.attributes[ attr ].itemSize * vertexCount );
break;
}
}
sortedAttributes[ attr ] = new sourceArray.constructor( this.attributes[ attr ].itemSize * vertexCount );
}
/* Move attribute positions based on the new index map */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册