|
@@ -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
|