new Velocity(minAngle, maxAngle, minMagnitude, maxMagnitude)
The velocity plugin chooses a velocity using polar notation, i.e.
given an angle range and a magnitude range, it creates a vector that is
then assigned as each particle's velocity.
Parameters:
| Name | Type | Description |
|---|---|---|
minAngle |
Number | The minimum angle of the velocity vector. |
maxAngle |
Number | The maximum angle of the velocity vector. |
minMagnitude |
Number | The minimum magnitude of the velocity vector. |
maxMagnitude |
Number | The maximum magnitude of the velocity vector. |
Methods
-
initialize(emitter, particle)
-
Called as part of the particle plugin lifecycle. Initialize is called on a particle when a particle is spawned. Note that particles are reused!
Parameters:
Name Type Description emitterParticleEmitter The ParticleEmitter acting upon this particle. particleParticle The Particle to initialize.