12345678910111213141516171819202122232425262728293031323334353637383940 |
- /**
- * @author mikael emtinger / http://gomo.se/
- * @author alteredq / http://alteredqualia.com/
- */
- THREE.Sprite = function ( material ) {
- THREE.Object3D.call( this );
- this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
- };
- THREE.Sprite.prototype = Object.create( THREE.Object3D.prototype );
- /*
- * Custom update matrix
- */
- THREE.Sprite.prototype.updateMatrix = function () {
- this.matrix.compose( this.position, this.quaternion, this.scale );
- this.matrixWorldNeedsUpdate = true;
- };
- THREE.Sprite.prototype.clone = function ( object ) {
- if ( object === undefined ) object = new THREE.Sprite( this.material );
- THREE.Object3D.prototype.clone.call( this, object );
- return object;
- };
- // Backwards compatibility
- THREE.Particle = THREE.Sprite;
|