CompressedTexture.js 703 B

12345678910111213141516171819202122232425262728
  1. import { Texture } from './Texture.js';
  2. class CompressedTexture extends Texture {
  3. constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) {
  4. super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace );
  5. this.isCompressedTexture = true;
  6. this.image = { width: width, height: height };
  7. this.mipmaps = mipmaps;
  8. // no flipping for cube textures
  9. // (also flipping doesn't work for compressed textures )
  10. this.flipY = false;
  11. // can't generate mipmaps for compressed textures
  12. // mips must be embedded in DDS files
  13. this.generateMipmaps = false;
  14. }
  15. }
  16. export { CompressedTexture };