CompressedTexture.js 820 B

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