UNPKG

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