提交 8589aece 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10381 from makc/patch-4

fixes #10380
......@@ -312,7 +312,9 @@ THREE.PLYLoader.prototype = {
// mandatory buffer data
geometry.setIndex( new ( buffer.indices.length > 65535 ? THREE.Uint32BufferAttribute : THREE.Uint16BufferAttribute )( buffer.indices, 1 ) );
if ( buffer.indices.length > 0 ) {
geometry.setIndex( new ( buffer.indices.length > 65535 ? THREE.Uint32BufferAttribute : THREE.Uint16BufferAttribute )( buffer.indices, 1 ) );
}
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( buffer.vertices, 3 ) );
// optional buffer data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册