瀏覽代碼

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 ) );