| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /**
- * @author alteredq / http://alteredqualia.com/
- *
- * parameters = {
- * color: <hex>,
- * opacity: <float>,
- * map: new THREE.Texture( <Image> ),
- *
- * blending: THREE.NormalBlending,
- * depthTest: <bool>,
- * depthWrite: <bool>,
- *
- * uvOffset: new THREE.Vector2(),
- * uvScale: new THREE.Vector2(),
- *
- * fog: <bool>
- * }
- */
- 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;
- };
|