소스 검색

added check to enable VertexColors in the shader if detected

Jono Brandel 8 년 전
부모
커밋
7c95558c54
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      examples/js/loaders/FBXLoader2.js

+ 5 - 0
examples/js/loaders/FBXLoader2.js

@@ -1211,6 +1211,11 @@
 
 									material = new THREE.MeshBasicMaterial( { color: 0x3300ff } );
 
+								}
+								if ( 'color' in geometry.attributes && geometry.attributes.color.count > 0 ) {
+
+									material.vertexColors = THREE.VertexColors;
+
 								}
 								if ( geometry.FBX_Deformer ) {