瀏覽代碼

Set .vertexColors on material if present in attributes.

Don McCurdy 8 年之前
父節點
當前提交
a9790116ef
共有 1 個文件被更改,包括 6 次插入0 次删除
  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 ] );