DataTexture3D.js 848 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @author Artur Trzesiok
  3. */
  4. import { Texture } from './Texture.js';
  5. import { NearestFilter } from '../constants.js';
  6. function DataTexture3D( data, width, height, depth ) {
  7. // We're going to add .setXXX() methods for setting properties later.
  8. // Users can still set in DataTexture3D directly.
  9. //
  10. // var texture = new THREE.DataTexture3D( data, width, height, depth );
  11. // texture.anisotropy = 16;
  12. //
  13. // See #14839
  14. Texture.call( this, null );
  15. this.image = { data: data, width: width, height: height, depth: depth };
  16. this.magFilter = NearestFilter;
  17. this.minFilter = NearestFilter;
  18. this.generateMipmaps = false;
  19. this.flipY = false;
  20. }
  21. DataTexture3D.prototype = Object.create( Texture.prototype );
  22. DataTexture3D.prototype.constructor = DataTexture3D;
  23. DataTexture3D.prototype.isDataTexture3D = true;
  24. export { DataTexture3D };
粤ICP备19079148号