Class: Attractor

Attractor

particle.Attractor

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.
Author:
  • thegoldenmule
Source:

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
emitter ParticleEmitter The ParticleEmitter instance.
particle Particle The particle to act on.
Source: