new Position(xval, yval, radius, innerRadius)
This plugin gives every particle a random position within a
given radius. The inner radius parameter may be used to specify a radius
that particles must be spawned outside of.
Parameters:
| Name | Type | Description |
|---|---|---|
xval |
Number | The x value from which the radius should extend. |
yval |
Number | The y value from which the radius should extends |
radius |
Number | A radius about the x,y coordinate to spawn particles within. |
innerRadius |
Number | A radius about the x,y coordinate to spawn particles outside of. If the innerRadius >= radius, radius will be resized to accommodate. |
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.