content/hifi-content/dave/walk-tools/walkTools/libraries/three.js/textures/DataTexture.js
2022-02-13 22:49:05 +01:00

24 lines
658 B
JavaScript

/**
* @author alteredq / http://alteredqualia.com/
*/
THREE.DataTexture = function ( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy ) {
THREE.Texture.call( this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
this.image = { data: data, width: width, height: height };
};
THREE.DataTexture.prototype = Object.create( THREE.Texture.prototype );
THREE.DataTexture.prototype.constructor = THREE.DataTexture;
THREE.DataTexture.prototype.clone = function () {
var texture = new THREE.DataTexture();
THREE.Texture.prototype.clone.call( this, texture );
return texture;
};