Explorar o código

Set .vertexColors on material if present in attributes.

Don McCurdy %!s(int64=8) %!d(string=hai) anos
pai
achega
a9790116ef
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      examples/js/loaders/GLTF2Loader.js

+ 6 - 0
examples/js/loaders/GLTF2Loader.js

@@ -1750,6 +1750,12 @@ THREE.GLTF2Loader = ( function () {
 
 						}
 
+						if ( geometry.attributes.color !== undefined ) {
+
+							material.vertexColors = THREE.VertexColors;
+
+						}
+
 						if ( primitive.indices !== undefined ) {
 
 							geometry.setIndex( dependencies.accessors[ primitive.indices ] );