forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParticleSystem.js
More file actions
29 lines (17 loc) · 766 Bytes
/
Copy pathParticleSystem.js
File metadata and controls
29 lines (17 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* @author alteredq / http://alteredqualia.com/
*/
THREE.ParticleSystem = function ( geometry, material ) {
THREE.Object3D.call( this );
this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
this.material = material !== undefined ? material : new THREE.ParticleBasicMaterial( { color: Math.random() * 0xffffff } );
this.sortParticles = false;
this.frustumCulled = false;
};
THREE.ParticleSystem.prototype = Object.create( THREE.Object3D.prototype );
THREE.ParticleSystem.prototype.clone = function ( object ) {
if ( object === undefined ) object = new THREE.ParticleSystem( this.geometry, this.material );
object.sortParticles = this.sortParticles;
THREE.Object3D.prototype.clone.call( this, object );
return object;
};