Explorar o código

Parse second UV channel

Steven Vergenz %!s(int64=8) %!d(string=hai) anos
pai
achega
d1e2a494d8
Modificáronse 2 ficheiros con 8 adicións e 0 borrados
  1. 4 0
      examples/js/loaders/GLTF2Loader.js
  2. 4 0
      examples/js/loaders/GLTFLoader.js

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

@@ -1719,6 +1719,10 @@ THREE.GLTF2Loader = ( function () {
 									geometry.addAttribute( 'uv', bufferAttribute );
 									break;
 
+								case 'TEXCOORD_1':
+									geometry.addAttribute( 'uv2', bufferAttribute );
+									break;
+
 								case 'COLOR_0':
 								case 'COLOR0':
 								case 'COLOR':

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

@@ -1625,6 +1625,10 @@ THREE.GLTFLoader = ( function () {
 									geometry.addAttribute( 'uv', bufferAttribute );
 									break;
 
+								case 'TEXCOORD_1':
+									geometry.addAttribute( 'uv2', bufferAttribute );
+									break;
+
 								case 'COLOR_0':
 								case 'COLOR0':
 								case 'COLOR':