How it works
Each explosion is two spiky outlines, an edge and a core, stored as a single row of a texture. A pixel’s colour is how far it sits between them, so every band of colour echoes the spikes.
While you hold, the outline redraws twelve times a second, the way hand-drawn animation boils. Let go and it pops on a spring. Then its spikes slowly lean, stretch and pull back as it shrinks and fades away.
Each pop behaves like a mass moving through spacetime. One wide front bends the light around it, smears it into its colours and slows as it travels, and when it reaches another explosion it shoves it, spins it and twists its spikes. The cursor is a soft glass lens over the whole thing.
The outside is always green. What’s inside is a roll of the dice, and about one in three comes up dark.
// colour is the position between the core and the edge, so the bands follow the spikes
float t = clamp((r - inner) / max(outer - inner, .001), 0., 1.);
vec3 c = ramp(t);
float alpha = 1. - smoothstep(.74, 1., t);