DataTexture.js 597 B

1234567891011121314151617181920212223
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) {
  5. THREE.Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
  6. this.image = { data: data, width: width, height: height };
  7. };
  8. THREE.DataTexture.prototype = Object.create( THREE.Texture.prototype );
  9. THREE.DataTexture.prototype.clone = function () {
  10. var texture = new THREE.DataTexture();
  11. THREE.Texture.prototype.clone.call( this, texture );
  12. return texture;
  13. };
粤ICP备19079148号