CompressedTexture.js 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 texture = new THREE.CompressedTexture();
  12. texture.image = this.image;
  13. texture.mipmaps = this.mipmaps;
  14. texture.format = this.format;
  15. texture.type = this.type;
  16. texture.mapping = this.mapping;
  17. texture.wrapS = this.wrapS;
  18. texture.wrapT = this.wrapT;
  19. texture.magFilter = this.magFilter;
  20. texture.minFilter = this.minFilter;
  21. texture.anisotropy = this.anisotropy;
  22. texture.offset.copy( this.offset );
  23. texture.repeat.copy( this.repeat );
  24. return texture;
  25. };
粤ICP备19079148号