five-on-it / apps/client/src/renderer/explosion
apps/client/src/renderer/explosion
Explosions, low-poly: what every blast event draws (a rocket's, a grenade's, a car blowing up, fire.ts in the simulation), sized by its reach.
- A flash: a white-hot ball swelling to most of the blast's reach and gone in a sixth of a second.
- A fireball: flame shards (octahedra stretched upward,
flames.ts' colours: white-hot, yellow, orange, red, then soot) bursting outward and rising, more and bigger for a bigger blast (shardCount). - A shockwave: a ring racing out over the ground past the blast's reach and fading.
- A smoke column and debris: the effects' dark puffs rising over it and a few bursts of sparks (the caller's,
effects.ts). - A scorch: a dark round mark left on the ground under it, fading after SCORCH_SECONDS.
Each kind is a pool made once, the oldest giving way to a new one, so a chain of cars going up one after the other costs no more than its pools.