DataArrayTexture.js 544 B

123456789101112131415161718192021222324252627
  1. import { Texture } from './Texture.js';
  2. import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';
  3. class DataArrayTexture extends Texture {
  4. constructor( data = null, width = 1, height = 1, depth = 1 ) {
  5. super( null );
  6. this.isDataArrayTexture = true;
  7. this.image = { data, width, height, depth };
  8. this.magFilter = NearestFilter;
  9. this.minFilter = NearestFilter;
  10. this.wrapR = ClampToEdgeWrapping;
  11. this.generateMipmaps = false;
  12. this.flipY = false;
  13. this.unpackAlignment = 1;
  14. }
  15. }
  16. export { DataArrayTexture };