Pārlūkot izejas kodu

Fix gltf parser sampler default values

Steven Vergenz 8 gadi atpakaļ
vecāks
revīzija
cc510a2420
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      examples/js/loaders/GLTFLoader.js

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

@@ -1090,10 +1090,10 @@ THREE.GLTFLoader = ( function () {
 
 								var sampler = json.samplers[ texture.sampler ];
 
-								_texture.magFilter = WEBGL_FILTERS[ sampler.magFilter ];
-								_texture.minFilter = WEBGL_FILTERS[ sampler.minFilter ];
-								_texture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ];
-								_texture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ];
+								_texture.magFilter = WEBGL_FILTERS[ sampler.magFilter || 9729 ];
+								_texture.minFilter = WEBGL_FILTERS[ sampler.minFilter || 9986 ];
+								_texture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS || 10497 ];
+								_texture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT || 10497 ];
 
 							}