Browse Source

Add missing properties for Texture to ObjectLoader.parseTextures()

Takahiro 7 years ago
parent
commit
1cfd6de5b2
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/loaders/ObjectLoader.js

+ 6 - 0
src/loaders/ObjectLoader.js

@@ -564,13 +564,19 @@ Object.assign( ObjectLoader.prototype, {
 				}
 
 				if ( data.format !== undefined ) texture.format = data.format;
+				if ( data.type !== undefined ) texture.type = data.type;
+				if ( data.encoding ) texture.encoding = data.encoding;
 
 				if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );
 				if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );
 				if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;
+				if ( data.mipmaps !== undefined ) texture.mipmaps = data.mipmaps;
 
 				if ( data.flipY !== undefined ) texture.flipY = data.flipY;
 
+				if ( data.premultiplyAlpha ) texture.premultiplyAlpha = data.premultiplyAlpha;
+				if ( data.unpackAlignment ) texture.unpackAlignment = data.unpackAlignment;
+
 				textures[ data.uuid ] = texture;
 
 			}