09a64747 2026-09-07 Pavel Safronov | 1 | import './style.css' |
| 2 | import { App } from './ui/app.js' |
9d5a061c 2026-09-27 Pavel Safronov | 3 | import { type World, emptyWorld, parseWorld } from './world/schema.js' |
09a64747 2026-09-07 Pavel Safronov | 4 | |
cf37225c 2026-09-07 Pavel Safronov | 5 | /** |
| 6 | * The slat count stays at its canon value of 0. The runtime control is disabled and |
| 7 | * its UI removed — see decisions.md D-033. Restoring a stored non-zero count here |
| 8 | * would silently reintroduce the bug for anyone who had already moved the slider. |
| 9 | */ |
9d5a061c 2026-09-27 Pavel Safronov | 10 | |
| 11 | /** |
| 12 | * The world as readers get it, made from `content/world.json` at build time (D-072). |
| 13 | * The app only reads it: the world is changed in the repository, not in the browser. |
| 14 | */ |
| 15 | async function loadWorld(url: string): Promise<World> { |
| 16 | try { |
| 17 | const res = await fetch(url) |
| 18 | if (res.ok) return parseWorld(await res.json()) |
| 19 | } catch { |
| 20 | // Unreachable or unreadable: an empty world still shows the cylinder. |
| 21 | } |
| 22 | return emptyWorld() |
| 23 | } |
| 24 | |
| 25 | new App(await loadWorld(`${import.meta.env.BASE_URL}world.json`)) |