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:
767 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @author alteredq / http://alteredqualia.com/
|
---|
3 | */
|
---|
4 |
|
---|
5 | THREE.ParticleSystem = function ( geometry, material ) {
|
---|
6 |
|
---|
7 | THREE.Object3D.call( this );
|
---|
8 |
|
---|
9 | this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
|
---|
10 | this.material = material !== undefined ? material : new THREE.ParticleSystemMaterial( { color: Math.random() * 0xffffff } );
|
---|
11 |
|
---|
12 | this.sortParticles = false;
|
---|
13 | this.frustumCulled = false;
|
---|
14 |
|
---|
15 | };
|
---|
16 |
|
---|
17 | THREE.ParticleSystem.prototype = Object.create( THREE.Object3D.prototype );
|
---|
18 |
|
---|
19 | THREE.ParticleSystem.prototype.clone = function ( object ) {
|
---|
20 |
|
---|
21 | if ( object === undefined ) object = new THREE.ParticleSystem( this.geometry, this.material );
|
---|
22 |
|
---|
23 | object.sortParticles = this.sortParticles;
|
---|
24 |
|
---|
25 | THREE.Object3D.prototype.clone.call( this, object );
|
---|
26 |
|
---|
27 | return object;
|
---|
28 |
|
---|
29 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.