|
@@ -12739,23 +12739,13 @@ THREE.CompressedTextureLoader.prototype = {
|
|
var texture = new THREE.CompressedTexture();
|
|
var texture = new THREE.CompressedTexture();
|
|
texture.image = images;
|
|
texture.image = images;
|
|
|
|
|
|
- // no flipping for cube textures
|
|
|
|
- // (also flipping doesn't work for compressed textures )
|
|
|
|
-
|
|
|
|
- texture.flipY = false;
|
|
|
|
-
|
|
|
|
- // can't generate mipmaps for compressed textures
|
|
|
|
- // mips must be embedded in DDS files
|
|
|
|
-
|
|
|
|
- texture.generateMipmaps = false;
|
|
|
|
|
|
+ var loader = new THREE.XHRLoader();
|
|
|
|
+ loader.setResponseType( 'arraybuffer' );
|
|
|
|
|
|
if ( url instanceof Array ) {
|
|
if ( url instanceof Array ) {
|
|
|
|
|
|
var loaded = 0;
|
|
var loaded = 0;
|
|
|
|
|
|
- var loader = new THREE.XHRLoader();
|
|
|
|
- loader.setResponseType( 'arraybuffer' );
|
|
|
|
-
|
|
|
|
var loadTexture = function ( i ) {
|
|
var loadTexture = function ( i ) {
|
|
|
|
|
|
loader.load( url[ i ], function ( buffer ) {
|
|
loader.load( url[ i ], function ( buffer ) {
|
|
@@ -12794,8 +12784,6 @@ THREE.CompressedTextureLoader.prototype = {
|
|
|
|
|
|
// compressed cubemap texture stored in a single DDS file
|
|
// compressed cubemap texture stored in a single DDS file
|
|
|
|
|
|
- var loader = new THREE.XHRLoader();
|
|
|
|
- loader.setResponseType( 'arraybuffer' );
|
|
|
|
loader.load( url, function ( buffer ) {
|
|
loader.load( url, function ( buffer ) {
|
|
|
|
|
|
var texDatas = scope._parser( buffer, true );
|
|
var texDatas = scope._parser( buffer, true );
|
|
@@ -14200,7 +14188,15 @@ THREE.CompressedTexture = function ( mipmaps, width, height, format, type, mappi
|
|
this.image = { width: width, height: height };
|
|
this.image = { width: width, height: height };
|
|
this.mipmaps = mipmaps;
|
|
this.mipmaps = mipmaps;
|
|
|
|
|
|
- this.generateMipmaps = false; // WebGL currently can't generate mipmaps for compressed textures, they must be embedded in DDS file
|
|
|
|
|
|
+ // no flipping for cube textures
|
|
|
|
+ // (also flipping doesn't work for compressed textures )
|
|
|
|
+
|
|
|
|
+ this.flipY = false;
|
|
|
|
+
|
|
|
|
+ // can't generate mipmaps for compressed textures
|
|
|
|
+ // mips must be embedded in DDS files
|
|
|
|
+
|
|
|
|
+ this.generateMipmaps = false;
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|