CompressedTexture.js 802 B

12345678910111213141516171819202122232425
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.CompressedTexture = function ( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter ) {
  5. THREE.Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type );
  6. this.image = { width: width, height: height };
  7. this.mipmaps = mipmaps;
  8. };
  9. THREE.CompressedTexture.prototype = Object.create( THREE.Texture.prototype );
  10. THREE.CompressedTexture.prototype.clone = function () {
  11. var clonedTexture = new THREE.CompressedTexture( this.mipmaps, this.image.width, this.image.height, this.format, this.type, this.mapping, this.wrapS, this.wrapT, this.magFilter, this.minFilter );
  12. clonedTexture.offset.copy( this.offset );
  13. clonedTexture.repeat.copy( this.repeat );
  14. return clonedTexture;
  15. };