浏览代码

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 ];