DataTexture2DArray.js 706 B

1234567891011121314151617181920212223242526
  1. import { Texture } from './Texture.js';
  2. import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';
  3. function DataTexture2DArray( data, width, height, depth ) {
  4. Texture.call( this, null );
  5. this.image = { data: data || null, width: width || 1, height: height || 1, depth: depth || 1 };
  6. this.magFilter = NearestFilter;
  7. this.minFilter = NearestFilter;
  8. this.wrapR = ClampToEdgeWrapping;
  9. this.generateMipmaps = false;
  10. this.flipY = false;
  11. this.needsUpdate = true;
  12. }
  13. DataTexture2DArray.prototype = Object.create( Texture.prototype );
  14. DataTexture2DArray.prototype.constructor = DataTexture2DArray;
  15. DataTexture2DArray.prototype.isDataTexture2DArray = true;
  16. export { DataTexture2DArray };
粤ICP备19079148号