CompressedTexture.js 720 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, encoding ) {
  4. super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
  5. this.image = { width: width, height: height };
  6. this.mipmaps = mipmaps;
  7. // no flipping for cube textures
  8. // (also flipping doesn't work for compressed textures )
  9. this.flipY = false;
  10. // can't generate mipmaps for compressed textures
  11. // mips must be embedded in DDS files
  12. this.generateMipmaps = false;
  13. }
  14. }
  15. CompressedTexture.prototype.isCompressedTexture = true;
  16. export { CompressedTexture };
粤ICP备19079148号