UNPKG

820 BJavaScriptView Raw
1import { Texture } from './Texture.js';
2
3function CompressedTexture( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
4
5 Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
6
7 this.image = { width: width, height: height };
8 this.mipmaps = mipmaps;
9
10 // no flipping for cube textures
11 // (also flipping doesn't work for compressed textures )
12
13 this.flipY = false;
14
15 // can't generate mipmaps for compressed textures
16 // mips must be embedded in DDS files
17
18 this.generateMipmaps = false;
19
20}
21
22CompressedTexture.prototype = Object.create( Texture.prototype );
23CompressedTexture.prototype.constructor = CompressedTexture;
24
25CompressedTexture.prototype.isCompressedTexture = true;
26
27
28export { CompressedTexture };