CubeTexture.js 926 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. import { Texture } from './Texture.js';
  5. import { CubeReflectionMapping, RGBFormat } from '../constants.js';
  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. format = format !== undefined ? format : RGBFormat;
  10. Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
  11. this.flipY = false;
  12. }
  13. CubeTexture.prototype = Object.create( Texture.prototype );
  14. CubeTexture.prototype.constructor = CubeTexture;
  15. CubeTexture.prototype.isCubeTexture = true;
  16. Object.defineProperty( CubeTexture.prototype, 'images', {
  17. get: function () {
  18. return this.image;
  19. },
  20. set: function ( value ) {
  21. this.image = value;
  22. }
  23. } );
  24. export { CubeTexture };