new Attractor(x, y, amount)
The Attractor plugin specifies a point which attracts or repels
particles.
Parameters:
| Name | Type | Description |
|---|---|---|
x |
Number | The x position to attract to or repel from. |
y |
Number | The y position to attract to or repel from. |
amount |
Number | The magnitude of the force of attraction. If this is negative it acts as a repelling force. |
Methods
-
update(emitter, particle)
-
Called as part of the particle plugin lifecycle. Update is called every frame to update a particle.
Parameters:
Name Type Description emitterParticleEmitter The ParticleEmitter instance. particleParticle The particle to act on.