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 draw at full resolution (a 3x phone draws 1170 by 2532 pixels). Add a way to draw at lower resolution on phones.
- Use
node scripts/webfps.mjsto check the deployed viewer.scripts/webshot.shcannot capture it.