UNPKG

three

Version:

JavaScript 3D library

47 lines (31 loc) 922 B
/** * @author alteredq / http://alteredqualia.com/ * * parameters = { * color: <hex>, * opacity: <float>, * map: new THREE.Texture( <Image> ), * * uvOffset: new THREE.Vector2(), * uvScale: new THREE.Vector2() * } */ 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; this.lights = false; 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; return this; };