提交 23d6cc56 编写于 作者: M Mr.doob

SphereBufferGeometry: Handle Uint16 limit. Fixes #7288.

上级 1c215af2
......@@ -88,7 +88,7 @@ THREE.SphereBufferGeometry = function ( radius, widthSegments, heightSegments, p
}
this.setIndex( new THREE.BufferAttribute( new Uint16Array( indices ), 1 ) );
this.setIndex( new ( positions.count > 65535 ? THREE.Uint32Attribute : THREE.Uint16Attribute )( indices, 1 ) );
this.addAttribute( 'position', positions );
this.addAttribute( 'normal', normals );
this.addAttribute( 'uv', uvs );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册