Browse Source

BasisTextureLoader: Fix example on iOS.

Don McCurdy 6 years ago
parent
commit
2865470a98

+ 7 - 1
examples/js/loaders/BasisTextureLoader.js

@@ -167,7 +167,7 @@ THREE.BasisTextureLoader.prototype = {
 
 				}
 
-				texture.minFilter = THREE.LinearMipMapLinearFilter;
+				texture.minFilter = mipmaps.length === 1 ? THREE.LinearFilter : THREE.LinearMipMapLinearFilter;
 				texture.magFilter = THREE.LinearFilter;
 				texture.generateMipmaps = false;
 				texture.needsUpdate = true;
@@ -449,6 +449,12 @@ THREE.BasisTextureLoader.BasisWorker = function () {
 
 		}
 
+		if ( basisFile.getHasAlpha() ) {
+
+			console.warn( 'THREE.BasisTextureLoader: Alpha not yet implemented.' );
+
+		}
+
 		var mipmaps = [];
 
 		for ( var mip = 0; mip < levels; mip ++ ) {

BIN
examples/textures/compressed/PavingStones.basis


BIN
examples/textures/compressed/kodim20.basis


+ 1 - 1
examples/webgl_loader_texture_basis.html

@@ -51,7 +51,7 @@
 				loader.setTranscoderPath( 'js/libs/basis/' );
 				loader.detectSupport( renderer );
 
-				loader.load( 'textures/compressed/kodim20.basis', function ( texture ) {
+				loader.load( 'textures/compressed/PavingStones.basis', function ( texture ) {
 
 					texture.encoding = THREE.sRGBEncoding;
 					material.map = texture;