Преглед на файлове

Support Texture datatype in GLTFLoader

Takahiro преди 8 години
родител
ревизия
b06ab4048c
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      examples/js/loaders/GLTFLoader.js

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

@@ -1072,6 +1072,8 @@ THREE.GLTFLoader = ( function () {
 
 							if ( texture.name !== undefined ) _texture.name = texture.name;
 
+							_texture.type = texture.type !== undefined ? WEBGL_TEXTURE_TYPES[ texture.type ] : THREE.UnsignedByteType;
+
 							if ( texture.sampler ) {
 
 								var sampler = json.samplers[ texture.sampler ];