Browse Source

Compare with undefined in parseTextures of ObjectLoader

Takahiro 7 years ago
parent
commit
27dabc262e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/loaders/ObjectLoader.js

+ 3 - 3
src/loaders/ObjectLoader.js

@@ -565,7 +565,7 @@ 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.encoding !== undefined ) 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 );
@@ -574,8 +574,8 @@ Object.assign( ObjectLoader.prototype, {
 
 				if ( data.flipY !== undefined ) texture.flipY = data.flipY;
 
-				if ( data.premultiplyAlpha ) texture.premultiplyAlpha = data.premultiplyAlpha;
-				if ( data.unpackAlignment ) texture.unpackAlignment = data.unpackAlignment;
+				if ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha;
+				if ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment;
 
 				textures[ data.uuid ] = texture;