2
0
Эх сурвалжийг харах

Add code to add vertex color attribute to gltf models

Steven Vergenz 8 жил өмнө
parent
commit
1e089aee21

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

@@ -1202,6 +1202,12 @@ THREE.GLTFLoader = ( function () {
 									geometry.addAttribute( 'uv', bufferAttribute );
 									break;
 
+								case 'COLOR_0':
+								case 'COLOR0':
+								case 'COLOR':
+									geometry.addAttribute( 'color', bufferAttribute );
+									break;
+
 								case 'WEIGHT':
 									geometry.addAttribute( 'skinWeight', bufferAttribute );
 									break;