소스 검색

FBXLoader2: Check LayerElementColor before creating color attribute.

Mr.doob 8 년 전
부모
커밋
c2308789d8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 ) );