source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/src/objects/Sprite.js@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 790 bytes
Line 
1/**
2 * @author mikael emtinger / http://gomo.se/
3 * @author alteredq / http://alteredqualia.com/
4 */
5
6THREE.Sprite = function ( material ) {
7
8 THREE.Object3D.call( this );
9
10 this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
11
12};
13
14THREE.Sprite.prototype = Object.create( THREE.Object3D.prototype );
15
16/*
17 * Custom update matrix
18 */
19
20THREE.Sprite.prototype.updateMatrix = function () {
21
22 this.matrix.compose( this.position, this.quaternion, this.scale );
23
24 this.matrixWorldNeedsUpdate = true;
25
26};
27
28THREE.Sprite.prototype.clone = function ( object ) {
29
30 if ( object === undefined ) object = new THREE.Sprite( this.material );
31
32 THREE.Object3D.prototype.clone.call( this, object );
33
34 return object;
35
36};
37
38// Backwards compatibility
39
40THREE.Particle = THREE.Sprite;
Note: See TracBrowser for help on using the repository browser.