CompressedArrayTexture.js 604 B

1234567891011121314151617181920212223242526272829303132
  1. import { ClampToEdgeWrapping } from '../constants.js';
  2. import { CompressedTexture } from './CompressedTexture.js';
  3. class CompressedArrayTexture extends CompressedTexture {
  4. constructor( mipmaps, width, height, depth, format, type ) {
  5. super( mipmaps, width, height, format, type );
  6. this.isCompressedArrayTexture = true;
  7. this.image.depth = depth;
  8. this.wrapR = ClampToEdgeWrapping;
  9. this.layerUpdates = new Set();
  10. }
  11. addLayerUpdates( layerIndex ) {
  12. this.layerUpdates.add( layerIndex );
  13. }
  14. clearLayerUpdates() {
  15. this.layerUpdates.clear();
  16. }
  17. }
  18. export { CompressedArrayTexture };