Creates a fire grid over options.center/size (sampling the world or landscape once per cell).
Settings; anything not given uses DEFAULT_FIRE.
World, weather or a custom landscape (object inputs, not JSON).
Full fuel per cell and class, kg/m², 3 per cell.
Cells per side.
Ground height per cell, metres.
1 where fire cannot go.
Current fuel per cell and class (grass, shrub, tree), kg/m², 3 per cell.
Fuel moisture per cell (fraction of dry weight) at the last weather refresh.
Resolved settings.
Cells per side (same as cols).
Cell states (see FIRE_STATE), row-major from (minX, minZ).
ReadonlystatsRunning totals.
Ticks since tick 0.
Bumped on every tick or change (renderers compare it).
Minimum x of the grid (frame coordinates).
Minimum z of the grid (frame coordinates).
Simulation time at the start of the next tick, seconds.
Seconds since cell index caught fire, or Infinity if it is not burning.
Seconds since cell index burnt out, or Infinity if it is not burnt or regrowing.
Centre of cell index, [x, z].
Ground height at (x, z), bilinear between cell centres.
Total current fuel of a cell, kg/m².
Fire intensity 0…1 of a cell (0 unless burning): rises and falls over its burn.
Starts a fire at (x, z) within radius metres at time (default: the next tick). Ignitions are
stored in options.ignitions, so they replay when time is scrubbed back.
Cell index at (x, z), or −1 outside the grid.
Share (0…1) of each class's full fuel that has grown back at (x, z): 1 where never burnt.
Replaces all settings (anything not given goes back to defaults), rebuilds and replays.
Back to tick 0: full fuel everywhere, nothing burning (scheduled ignitions are kept).
Runs (or replays) to time, seconds. Quiet stretches with nothing burning are skipped in one jump.
With a budget (milliseconds) it stops early, after at least one tick, once that much time is spent and catches up on later
calls; the result is the same either way, since the state depends only on the tick.
Burn scar 0…1 of a cell: rises while burning, 1 when burnt, fading as it regrows. Feeds the burn state.
Merges input into the settings, rebuilds the grid and replays to the current time.
Advances exactly one tick.
Fuel on the grid now, kg, summed cell by cell (stats.fuel is the running total).
Wind velocity [x, z] (m/s) the cell saw at the last weather refresh.
A deterministic cellular-automaton wildfire over a square region of a frame, after Rothermel: each cell's rate of spread comes from its fuel (grass, shrubs, trees from the biome scatter tables and grass presets), fuel moisture (from the weather's humidity, rain and snow, damped by Rothermel's moisture coefficient), wind along the spread direction and slope (uphill runs). Water, bare rock, snow, roads and firebreak lines stop it. Cells go unburnt → burning → burnt → regrowing (grass in weeks, shrubs in years, trees in decades) → unburnt, and lightning from the weather starts new fires.
Everything advances in whole ticks and is seeded, so the same options, world, weather and time give the same fire; FireSim.runTo replays from the start when time goes backwards, and quiet periods (nothing burning) are skipped in one jump.
Example