diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index fac65a19..31185fe7 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -118,7 +118,7 @@ jobs: mkdir -p _site cp bin/forefire.mjs bin/forefire.wasm _site/ cp bindings/wasm/index.html bindings/wasm/worker.mjs \ - bindings/wasm/landscape.mjs bindings/wasm/terrain3d.mjs _site/ + bindings/wasm/landscape.mjs bindings/wasm/terrain3d.mjs bindings/wasm/overlays.mjs _site/ - name: Upload artifact if: steps.pages.outputs.publish == 'true' diff --git a/CHANGELOG.md b/CHANGELOG.md index 73133a4d..85963b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ history, so they summarise each release rather than list every change. The ### Added +- The browser demo can draw the DFCI grid, water points and DFCI tracks from + the IGN Géoplateforme, in France. These layers are display only: they never + reach the simulation. - `pyforefire.run_ensemble` runs one simulation per member in parallel worker processes and returns their arrival-time maps; `pyforefire.burn_probability` turns them into a burn-probability map. A diff --git a/bindings/wasm/README.md b/bindings/wasm/README.md index bb1b47ec..7b98bb3a 100644 --- a/bindings/wasm/README.md +++ b/bindings/wasm/README.md @@ -56,12 +56,12 @@ Headless, under Node: node bindings/wasm/smoke.mjs bin/forefire.mjs ``` -In a browser — copy the four page files next to the build outputs and serve +In a browser — copy the five page files next to the build outputs and serve the directory, since a `file://` page can neither fetch the `.wasm` nor start a module worker: ```sh -cp bindings/wasm/{index.html,worker.mjs,landscape.mjs,terrain3d.mjs} bin/ +cp bindings/wasm/{index.html,worker.mjs,landscape.mjs,terrain3d.mjs,overlays.mjs} bin/ python3 -m http.server -d bin ``` @@ -161,6 +161,15 @@ perimeter survives but stops advancing, is caught by a burnt-area plateau over a twelve-step window (`stalled`), and an ignition on bare ground is reported as `never-caught` rather than as a fire that stopped. +### Reference layers + +`overlays.mjs` draws three optional layers from the IGN Géoplateforme, in France +only: the DFCI grid with its square names, water points (cisterns as squares, +the rest as circles) and DFCI tracks. They are **for reading the map and nothing +else**: they never reach the worker, so a run is the same with them on or off. +Each is off by default and fetched only when switched on. BD TOPO shows what is +mapped, not whether a water point is full or a track is passable. + ### 3D terrain `terrain3d.mjs` draws the elevation field as a textured mesh in raw WebGL — no diff --git a/bindings/wasm/index.html b/bindings/wasm/index.html index f2e73690..dccfee19 100644 --- a/bindings/wasm/index.html +++ b/bindings/wasm/index.html @@ -11,7 +11,7 @@ Copy the page files next to the build outputs and serve the directory over http — a file:// page can neither fetch the .wasm nor start a module worker: - cp bindings/wasm/{index.html,worker.mjs,landscape.mjs,terrain3d.mjs} bin/ + cp bindings/wasm/{index.html,worker.mjs,landscape.mjs,terrain3d.mjs,overlays.mjs} bin/ python3 -m http.server -d bin --> @@ -289,6 +289,7 @@ } .linkish:hover { color: var(--ink); } #credit { font-size: 11px; color: var(--dim); margin: 0; } + #referenceNote { font-size: 11px; color: var(--dim); margin: 0.5rem 0 0; } @media (max-width: 52rem) { body { grid-template-columns: minmax(0, 1fr); overflow: auto; } @@ -385,6 +386,12 @@

View

+
+ + + +
+