Pārlūkot izejas kodu

added check to enable VertexColors in the shader if detected

Jono Brandel 8 gadi atpakaļ
vecāks
revīzija
7c95558c54
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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 ) {