Ver código fonte

Merge pull request #10504 from stevenvergenz/gltf-vert-colors

Load vertex color buffers from glTF models
Mr.doob 8 anos atrás
pai
commit
c7897df6d2
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      examples/js/loaders/GLTFLoader.js

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

@@ -1359,6 +1359,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;