DataTexture.js 699 B

1234567891011121314151617181920
  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. this.magFilter = magFilter !== undefined ? magFilter : THREE.NearestFilter;
  8. this.minFilter = minFilter !== undefined ? minFilter : THREE.NearestFilter;
  9. this.flipY = false;
  10. this.generateMipmaps = false;
  11. };
  12. THREE.DataTexture.prototype = Object.create( THREE.Texture.prototype );
  13. THREE.DataTexture.prototype.constructor = THREE.DataTexture;
粤ICP备19079148号