DataTexture.js 703 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @author alteredq / http://alteredqualia.com/
  3. */
  4. THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) {
  5. if ( magFilter === undefined ) {
  6. magFilter = THREE.NearestFilter;
  7. }
  8. if ( minFilter === undefined ) {
  9. minFilter = THREE.NearestFilter;
  10. }
  11. THREE.Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
  12. this.image = { data: data, width: width, height: height };
  13. this.flipY = false;
  14. this.generateMipmaps = false;
  15. };
  16. THREE.DataTexture.prototype = Object.create( THREE.Texture.prototype );
  17. THREE.DataTexture.prototype.constructor = THREE.DataTexture;
粤ICP备19079148号