The live demo starts when it’s in view.Drag across the fire’s path to scrape a break · 1–4 pick a tool · turn the wind dial · Space pauses
A wildfire run as pure, seeded rules a server can run as they are: 8 m blocks of grass, scrub and woods over a 1 m raster of roads and water, stepped a minute at a time.
What it costs a frame
CPU
0.80 ms
02468101216.7 ms
GPU
not used
CPU, median
0.80 ms
CPU, 95th pct
5.34 ms
Draw calls
0
Weight
Moderate
Measured 13 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged CPU 0.52–1.27 ms). What ran: Measured with a fire lit upwind in a strong breeze at 30 minutes a second, a break laid across its path, embers and smoke on; it is cleared and lit again when it goes out. The time includes stepping the fire map (about 13,500 blocks), redrawing its layer where it burns, and the Canvas 2D drawing. Paused or out, nothing is drawn. Phones: tiers are being measured next.
apple · Apple A19 Proin a browser tab · 16 November 2026
not timed
1.44
11.1
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026
not timed
1.41
6.01
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
What it needs
Renders with
Canvas 2DA 2D canvas: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages
What it’s for
A wildfire event in an open-world or strategy game
A fire a server runs and every client draws the same
Replays and save games of a spreading hazard
A firefighting or land-management game where breaks must hold
A teaching model of how wind, fuel and slope steer a fire
Any spreading front on a grid (blight, flood of influence) that must be deterministic
Pitfalls, in brief
The weather callback must be pure: the same minute must give the same air.
Determinism holds only for the same fuel grid, seed, start, weather, log and knobs.
A command applies at the first step at or after its minute (one at 950.5 at the step of 951, however the steps are called), and only if that step is still to come: log it at state.minute (or later).
The gaps between blocks are worked out once per grid and kept in a WeakMap on it.
The first step on a new grid pays for those gaps (tens of ms for 13,500 blocks).
6 more in brief
The knobs are speeds in real metres a second with a step of minuteSeconds (2 s, the source game’s compressed clock).
A break one block wide holds at any angle only because fire never takes a diagonal or knight’s move through line blocks.
Embers jump roads, not by gaps: a 9.5 m road holds a grass fire in a gale but a crown run throws embers 50 m across it.
Rolls are hashes of (seed, block, minute, purpose), so visiting order never matters, but two fires with the same seed on the same grid spot identically: seed each fire from its own id (seedFrom).
Snapshots store the minute and every touched block, not the log or the weather: keep those beside it. restoreWildfire needs the same grid: it returns null for a bigger grid’s or for text that is not a snapshot, but a smaller grid’s restores misplaced, so keep the grid’s revision beside it too.
Counting functions (fireCounts, reachOf) walk the touched box; heldLines walks the whole grid.
11 pitfalls in full, the hook-up guide, the module source and its tests come with the part.
Where it comes from
From HaTac. Fully custom code.
Austin Appleby, MurmurHash3 (public domain): The rolls mix with MurmurHash3’s 32-bit finaliser (its two multiply–xorshift rounds).
Fowler–Noll–Vo hash, FNV-1a (public domain): `seedFrom` turns text into a seed with FNV-1a before the mix.
The elliptical fire shape (after Anderson, 1983, and Alexander, 1985): The idea that a wind-driven fire grows as an ellipse whose length-to-breadth ratio rises with the wind; the speeds and the ratio here are the game’s own tuning, not those papers’ equations.