Particles are emitted at a random point long a line at the bottom of the screen
and accelerate upwards under a constant “Gravity” force. Each
particle starts with a randomized velocity and initial age.

A ColorBlender controller changes the color of each particle as it
ages, progressing through a number of colours:

Blue

Teal

Yellow

Red

Orange

Gray

Crucially, the particles are drawn in OpenGL with additive blending, which is
very typical for particles that appear to emit light:

glBlendFunc(GL_SRC_ALPHA,GL_ONE)

The means that the base of the fire is a bright, blended white and not a
mixture of blue, teal and yellow.

Each explosion creates two groups: the sparks group, which is populated with
particles immediately, and the trails group. A PerParticleEmitter in
emits a trail of particles into the trails group for each particle in the
sparks group.

To ensure that the sparks fly out evenly, their velocities are randomly
distributed on the surface of a Sphere domain.

A subtle element is that the Movement controller applies more
damping to the trails than to the sparks. This is consistent with a higher
drag for these particles. This gives the effect that the sparks feel a little
“heavier” than the tails. To use an analogy, this is like the difference
between marbles and confetti falling through the air.

Particles are emitted from a single AABox-shaped
StaticEmitter above and in front of the camera, with a randomized
velocity towards the camera.

The different letters are chosen by the SpriteTexturizer. A texture
is supplied that contains all the different letters with different texture
coordinates (a texture atlas). The list of texture coordinates for each letter
is passed to the SpriteTexturizer which picks between these for each
particle.

This complex effect consists of particles attracted by a Cone-shaped
Magnet. Short particle trails are added with the same
PerParticleEmitter technique as for the Fireworks example.

To ensure particles circulate, two Drag controllers push particles
in opposing directions. The front controller pushes particles to the right,
while the back controller pushes particles to the left. This sets up the “spin”
of the vortex.