T-014: Viewer shows the sim and opens checkpoints
Goal
The viewer displays a real world from crates/sim, live or loaded from a checkpoint, native
and in the browser.
Scope
- Replace the placeholder data with the sim's read-only view. Draw cells as spheres coloured by their colour and opacity, with bonds optional. No art direction yet.
- Run the sim inside the viewer: play, pause, single step, speed control.
- Open a checkpoint or a run folder natively. In the browser, open a checkpoint by URL parameter or by dropping a file on the page.
- Continue simulating from the loaded checkpoint at whatever speed the device manages. Show steps per second.
viewer --screenshotaccepts a checkpoint, a camera position and a step count, so any agent can get a picture of any world.
Done when
- ☐ A checkpoint written by
runneron this machine opens in the deployed web viewer and keeps running. Screenshot indocs/media/T-014/. - ☐
docs/VIEWER.mdupdated.
Notes from T-002
- The renderer only sees the
WorldSourceinterface incrates/viewer/src/source.rs. Implement it over the sim's read-only view. - T-002 removed the viewer's dependency on
crates/sim. Add it back here. - Phones: already handled by T-049 (pixel ratio cap, simpler spheres, automatic quality,
?diag=1and?bench=1). Keep all of that working. Seedocs/VIEWER.md. - Use
node scripts/webfps.mjsto check the deployed viewer.scripts/webshot.shcannot capture it.
Added 2026-12-02
- The sim core is merged. Read
docs/ARCHITECTURE.md: section 10 is the view you draw from, and section 12 has your contract (sim::view,World::load,World::step, nothing else). - The real physics (T-009), growth (T-010) and the runner (T-012) are being built by other
agents right now. Use
sim::testbedworlds and checkpoints made withWorld::saveuntil they land. Do not wait for them. - Worlds will become very large and bodies will differ in size by orders of magnitude
(
docs/DESIGN.mdsection 5, "Scale is free"). Do not build in an assumption that cells are all about the same size, and measure the frame rate at 100,000 cells. - The look is decided (
docs/DESIGN.mdsection 11) but is not this ticket. Plain spheres with true colour and opacity are right here. T-015 builds the look on top of your work.