CubeTexture.js 856 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { Texture } from './Texture';
  2. import { CubeReflectionMapping } from '../constants';
  3. /**
  4. * @author mrdoob / http://mrdoob.com/
  5. */
  6. function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {
  7. images = images !== undefined ? images : [];
  8. mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
  9. Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
  10. this.flipY = false;
  11. }
  12. CubeTexture.prototype = Object.create( Texture.prototype );
  13. CubeTexture.prototype.constructor = CubeTexture;
  14. CubeTexture.prototype.isCubeTexture = true;
  15. Object.defineProperty( CubeTexture.prototype, 'images', {
  16. get: function () {
  17. return this.image;
  18. },
  19. set: function ( value ) {
  20. this.image = value;
  21. }
  22. } );
  23. export { CubeTexture };
粤ICP备19079148号