A controller is a callable of the form:

controller(timedelta, group)

Particle controllers are bound to particle groups and invoked via the group’s update() method. A typical controller will iterate all particles in a group, apply some logic and mutate the particles or remove or add particles to the group.

Lepton’s built-in controllers are written in C for performance, but Python functions or classes with __call__() methods can also be used.


Many of the controllers affect the position and velocity of particles.


These controllers affect the color or alpha (opacity) of particles.


Particles may grow or shrink over time.


If you continue to emit particles into a group then the number of particles can grow in an unbounded way. To avoid this you should ensure there is some reliable way in which particles can be destroyed.

Particles may be destroyed after a certain per-particle lifetime, or perhaps when they move into or out of a domain.