DataTexture2DArray.js 741 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * @author Takahiro https://github.com/takahirox
  3. */
  4. import { Texture } from './Texture.js';
  5. import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';
  6. function DataTexture2DArray( data, width, height, depth ) {
  7. Texture.call( this, null );
  8. this.image = { data: data, width: width, height: height, depth: depth };
  9. this.magFilter = NearestFilter;
  10. this.minFilter = NearestFilter;
  11. this.wrapR = ClampToEdgeWrapping;
  12. this.generateMipmaps = false;
  13. this.flipY = false;
  14. this.needsUpdate = true;
  15. }
  16. DataTexture2DArray.prototype = Object.create( Texture.prototype );
  17. DataTexture2DArray.prototype.constructor = DataTexture2DArray;
  18. DataTexture2DArray.prototype.isDataTexture2DArray = true;
  19. export { DataTexture2DArray };