Browse Source

MMDLoader: Replace Float32BufferAttribute with Uint16BufferAttribute for skinIndex

Takahiro 7 years ago
parent
commit
2f79201352
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/loaders/MMDLoader.js

+ 1 - 1
examples/js/loaders/MMDLoader.js

@@ -1476,7 +1476,7 @@ THREE.MMDLoader.prototype.createMesh = function ( model, texturePath, onProgress
 		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 ) );
-		geometry.addAttribute( 'skinIndex', new THREE.Float32BufferAttribute( buffer.skinIndices, 4 ) );
+		geometry.addAttribute( 'skinIndex', new THREE.Uint16BufferAttribute( buffer.skinIndices, 4 ) );
 		geometry.addAttribute( 'skinWeight', new THREE.Float32BufferAttribute( buffer.skinWeights, 4 ) );
 
 		geometry.computeBoundingSphere();