CompressedTexture.js 877 B

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