Story / screenshot pipeline
Every renderable chunk regenerates its asset under
_docs/book/src/assets/<crate>/<id>.{png,html}. The mdBook chapter for that
chunk embeds the asset; without it, the page renders empty — that's the gate.
Producing assets
just snapshots # all crates
just snapshots-wisp # wgpu PNGs only
just snapshots-ui # Leptos SSR HTML only
Both exporters are real binaries inside their respective storybooks, so they run on CI without any GUI.
wisp-storybook exporter (PNG)
For each Story in wisp_storybook::stories::all_stories():
- Build a fresh
ApplicationandRenderer(Rgba8Unorm, 256×256). - Call
story.build(app, &mut stage); iftickis set, calltick(stage, 0.0). - Render to a
RenderTextureand read pixels back. - Save to
_docs/wisp-book/src/assets/wisp/<id>.png(the wisp-book is the canonical home for renderer assets; the screen book cross-links to them).
ui-storybook exporter (HTML)
For each Story in ui_storybook::stories::all_stories():
- Call
story.render()to get the SSR HTML body. - Wrap it in a complete
<html>document withstyle.cssinlined. - Save to
_docs/book/src/assets/ui/<id>.html.
A future upgrade swaps the HTML output for a PNG via headless_chrome.
Embedding in mdBook
Standard markdown:

Or for a UI demo with iframe:
<iframe src="../assets/ui/dope-sheet-basic.html" width="100%" height="280"></iframe>
Convention checklist (per chunk)
When closing any visible chunk:
- Story exists and snapshot test is green.
-
just snapshotsregenerated the asset. - mdBook chapter for the chunk references the asset.
-
Asset committed (
_docs/book/src/assets/...is part of the commit).