|
@@ -3,14 +3,21 @@
|
|
|
* @author alteredq / http://alteredqualia.com/
|
|
|
*/
|
|
|
|
|
|
-THREE.Sprite = function ( material ) {
|
|
|
+THREE.Sprite = ( function () {
|
|
|
|
|
|
- THREE.Object3D.call( this );
|
|
|
+ var geometry = new THREE.Geometry2( 3 );
|
|
|
+ geometry.vertices.set( [ - 0.5, - 0.5, 0, 0.5, - 0.5, 0, 0.5, 0.5, 0 ] );
|
|
|
|
|
|
- this.geometry = { boundingSphere: new THREE.Sphere( new THREE.Vector3(), 0.5 ), addEventListener: function () {} /* WebGLRenderer dependency */ };
|
|
|
- this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
|
|
|
+ return function ( material ) {
|
|
|
|
|
|
-};
|
|
|
+ THREE.Object3D.call( this );
|
|
|
+
|
|
|
+ this.geometry = geometry;
|
|
|
+ this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+} )();
|
|
|
|
|
|
THREE.Sprite.prototype = Object.create( THREE.Object3D.prototype );
|
|
|
|