Browse Source

Add code to add vertex color attribute to gltf models

Steven Vergenz 8 years ago
parent
commit
1e089aee21
1 changed files with 6 additions and 0 deletions
  1. 6 0
      examples/js/loaders/GLTFLoader.js

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

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