/** * @author alteredq / http://alteredqualia.com/ * * parameters = { * color: , * opacity: , * map: new THREE.Texture( ), * * blending: THREE.NormalBlending, * depthTest: , * depthWrite: , * * uvOffset: new THREE.Vector2(), * uvScale: new THREE.Vector2(), * * fog: * } */ THREE.SpriteMaterial = function ( parameters ) { THREE.Material.call( this ); this.type = 'SpriteMaterial'; this.color = new THREE.Color( 0xffffff ); this.map = null; this.rotation = 0; this.fog = false; // set parameters this.setValues( parameters ); }; THREE.SpriteMaterial.prototype = Object.create( THREE.Material.prototype ); THREE.SpriteMaterial.prototype.constructor = THREE.SpriteMaterial; THREE.SpriteMaterial.prototype.copy = function ( source ) { THREE.Material.prototype.copy.call( this, source ); this.color.copy( source.color ); this.map = source.map; this.rotation = source.rotation; this.fog = source.fog; return this; };