explosions library

Classes

ExplosionBit
Plume
A rolling fireball.
PlumeColumn
A rising column of lobes boiling up a stem from the floor.
StoneColors

Properties

barrelExplosionEffect → SimulatedEffect
final
bigExplosionEffect → SimulatedEffect
final
cartoonPowEffect → SimulatedEffect
final
dirtExplosionEffect → SimulatedEffect
final
explosionsEffects → List<PixelEffect>
final
fireworkBurstEffect → SimulatedEffect
final
fireworkRocketEffect → SimulatedEffect
final
grenadeEffect → SimulatedEffect
final
implosionEffect → SimulatedEffect
final
kExplosionOutline → int
final
kExplosionSoot → int
final
kExplosionSoot2 → int
final
nukeEffect → SimulatedEffect
final
plasmaExplosionEffect → SimulatedEffect
final
smallExplosionEffect → SimulatedEffect
final
smokeBombEffect → SimulatedEffect
final

Functions

burnTrail(Painter p, List<({double t, double x, double y})> pts, double t, List<int> fr, List<int> sm, [double life = 0.5, double w = 1.0, double heat = 1.0]) → void
A burning thing's trail: pts (oldest first) at time t, drawn as a ribbon.
crater(Painter p, List<int> e, double x, double r, double k, [double a = 1.0]) → void
A crater in the floor at x.
cullParticles(Particles ps, double x0, double y0, double x1, double y1) → void
Drop particles that leave the box (local px), so nothing is drawn past the canvas.
dome(Painter p, List<int> f, double x, double r, double k) → void
A hemisphere of white-hot air on the floor at x, radius r.
drawDirt(Painter p, Particles ps, String layer) → void
Draw a particle system's GRIT as dirt in flight.
drawPs(Painter p, Particles ps, String layer, List<int> fr) → void
A particle system's layer ("back" or "front") with its FIRE puffs in the fire ramp fr.
drawRock(Painter p, ExplosionBit b, StoneColors st, List<int> fr) → void
A rock (a Bits CHUNK): a lit side, a shaded side and an outline, turning as it spins.
fadeEdges(Particles ps, double x0, double x1, [double w = 30.0, double y1 = double.infinity]) → void
Soft particles (smoke, dust, vapour) fade out over w px as they near the sides x0, x1.
fireBall(Painter p, SimParticle q, List<int> fr) → void
One FIRE particle drawn in the fire ramp fr: a darker rim, a lit core, a tongue on top, a hot heart.
fireRamp(List<int> f) → List<int>
A 9-step fire ramp, white-hot down to smouldering, from an 8-step palette (dark to bright).
glowDome(Painter p, double x, double y, double r, double w, int c, double k, [(double, double, double, double) box = const (double.negativeInfinity, double.negativeInfinity, double.infinity, double.infinity)]) → void
Light hugging the upper half of a circle of radius r at (x, y), falling off over width w.
haze(Painter p, double x, double y, double rx, double ry, int c(double d), double a(double d)) → void
A translucent ellipse (blended, never dithered): c and a may depend on d (0 centre .. 1 rim).
heatRamp(List<int> fr) → List<int>
Heat for a scorch, from a fire ramp (bright to dark) down to cinders.
lightPool(Painter p, double x, double y, double rx, double ry, int c, double k) → void
A soft pool of light, an ellipse rx by ry at (x, y): light falling on the floor.
lobe(Painter p, double x, double y, double r, List<int> fr, List<int> sm, double fire, double glow, double a, [double z = 0.0, int dark = 0, int style = 0]) → void
A lobe of a billowing cloud, shaded like a ball.
scorch(Painter p, List<int> hr, double t, double rx0, double cool, double fade, [int rows = 3]) → void
The floor under a blast: a burn that spreads out in a blink, glows white-hot and cools through hr to soot.
stoneColors(Object cRaw) → StoneColors
Stone colors from one body color: a lit face, the body, a shaded face, and the dust it makes.
updraft(Particles ps, double dt, {double x = 0.0, double top = double.negativeInfinity, double w = 12.0, double up = 150.0, double squeeze = 4.0, double pull = 0.0, double low = 10.0, double reach = 100.0, double k = 1.0}) → void
An updraft column at x: smoke, dust, fire and embers below top and within w of the axis are carried up (up px/s^2) and squeezed toward it.