Browser host and repo tools for shared .vzglyd slide repositories.
This repository exports runnable pages from web-preview/:
index.htmlpreviews bundles from a static slide root or a local.vzglydfileeditor.htmledits and exportsplaylist.jsonfor a static slide rootview.htmlis the canonical fullscreen player and profiling target- Runtime API remains Rust/WASM (
WebHost) - Bundle extraction + WASM/sidecar/renderer bridge lives in
web-preview/js/
# one-time
cargo install wasm-pack
# build wasm glue directly into the preview folder
wasm-pack build --target web --out-dir web-preview/pkgServe the repository root over HTTP and open http://localhost:8080/web-preview/.
python3 -m http.server 8080To preview a static slide root in the browser, serve that root separately as well:
python3 -m http.server 8081 --directory /path/to/slides-repoThen paste http://localhost:8081/ into the preview/editor UI.
GitHub Pages-style hosting works as well. For example, if playlist.json lives at
https://rodgerbenham.github.io/vzglyd/playlist.json, use
https://rodgerbenham.github.io/vzglyd/ as the repo base URL.
For the local reference repo already used in this workspace, run:
./serve-reference-slides.shThat serves the local slide root at http://localhost:8081/ by default.
import init, { WebHost } from './pkg/vzglyd_web.js';
await init();
const host = new WebHost(canvas, {
networkPolicy: 'any_https',
trace: { enabled: true },
});
await host.loadBundle(bundleBytes, { logLoadSummary: true });
host.startTraceCapture();
host.frame(performance.now());
const stats = host.stats();
host.stopTraceCapture();
host.downloadTrace('example.perfetto.json');
host.teardown();Tracing is built into the runtime boundaries. The canonical profiling target is web-preview/view.html.
- Open
view.html. - Click
Start Trace. - Reproduce the issue.
- Click
Stop & Download. - Open the downloaded
*.perfetto.jsonfile in Perfetto.
host.startTraceCapture(), host.stopTraceCapture(), host.exportTrace(), and host.downloadTrace() are available from JS. Passing ?trace=1 to view.html auto-starts capture, but the button path is the normal workflow.
Tracing is viewer-wide: every slide loaded through view.html gets host spans for load, update,
uploads, and render work. Slides and sidecars can add their own guest scopes on top, but the base
player timings are available even when a guest has not been upgraded yet.
Slide-local preview pages should redirect into web-preview/view.html rather than carrying their own browser runtime shell.
The shared slide source is a user-managed directory or repo root served over HTTP with:
- required
playlist.jsonat repo root - repo-root-relative
.vzglydbundle paths inplaylist.json
The full contract and example layout live in docs/shared-slide-repo.md.
- Current browser backend is WebGPU only.
.vzglydarchives are expected to containmanifest.jsonandslide.wasm.- Optional
sidecar.wasmis loaded when present. - Bundles must declare cassette artwork in
manifest.json -> assets.artwith J-card, side A label, and side B label image paths. - Bundles can advertise editor-friendly parameter schemas in
manifest.json -> params.fields.