Explorar o código

Merge pull request #20800 from Mugen87/dev3

CompressedTextureLoader: Fix type of CompressedTexture.image.
Mr.doob %!s(int64=4) %!d(string=hai) anos
pai
achega
9a0d4d22ac
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      src/loaders/CompressedTextureLoader.js

+ 4 - 3
src/loaders/CompressedTextureLoader.js

@@ -26,7 +26,6 @@ CompressedTextureLoader.prototype = Object.assign( Object.create( Loader.prototy
 		const images = [];
 
 		const texture = new CompressedTexture();
-		texture.image = images;
 
 		const loader = new FileLoader( this.manager );
 		loader.setPath( this.path );
@@ -53,9 +52,9 @@ CompressedTextureLoader.prototype = Object.assign( Object.create( Loader.prototy
 
 				if ( loaded === 6 ) {
 
-					if ( texDatas.mipmapCount === 1 )
-						texture.minFilter = LinearFilter;
+					if ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter;
 
+					texture.image = images;
 					texture.format = texDatas.format;
 					texture.needsUpdate = true;
 
@@ -102,6 +101,8 @@ CompressedTextureLoader.prototype = Object.assign( Object.create( Loader.prototy
 
 					}
 
+					texture.image = images;
+
 				} else {
 
 					texture.image.width = texDatas.width;