Browse Source

FBXLoader2: Check LayerElementColor before creating color attribute.

Mr.doob 8 years ago
parent
commit
c2308789d8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/loaders/FBXLoader2.js

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

@@ -746,7 +746,7 @@
 								geo.addAttribute( 'uv', new THREE.BufferAttribute( new Float32Array( bufferInfo.uvBuffer ), 2 ) );
 
 							}
-							if ( bufferInfo.colorsBuffer.length > 0 ) {
+							if ( 'LayerElementColor' in geometryNode.subNodes ) {
 
 								geo.addAttribute( 'color', new THREE.BufferAttribute( new Float32Array( bufferInfo.colorsBuffer ), 4 ) );