CubeTexture.js 733 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. THREE.CubeTexture = function ( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
  5. mapping = mapping !== undefined ? mapping : THREE.CubeReflectionMapping;
  6. THREE.Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
  7. this.images = images;
  8. };
  9. THREE.CubeTexture.prototype = Object.create( THREE.Texture.prototype );
  10. THREE.CubeTexture.prototype.constructor = THREE.CubeTexture;
  11. THREE.CubeTexture.clone = function ( texture ) {
  12. if ( texture === undefined ) texture = new THREE.CubeTexture();
  13. THREE.Texture.prototype.clone.call( this, texture );
  14. texture.images = this.images;
  15. return texture;
  16. };