webgpu demo
All checks were successful
Deploy / build-deploy (push) Successful in 1m38s

This commit is contained in:
Jorijn van der Graaf 2026-07-19 01:13:30 +02:00
commit fb2f6079cc
16 changed files with 508 additions and 9 deletions

View file

@ -18,7 +18,14 @@ int main() {
// plus the rAF driver; even without subscribing to its events we need
// it so StartSync() can keep the wasm module alive past main() (the
// bridge stashes a raw pointer, so the storage has to outlive main).
static Window window(0, 0, "Catcrafts");
// The dimensions are a hint only — the JS bridge sizes the render
// surface to the canvas (full viewport, or the mount element).
static Window window(1280, 720, "Catcrafts");
// Build the ray-tracing pipeline + scene now (runs StartInit/FinishInit).
// The render canvas starts hidden; the demo only traces once a route
// mounts it into #webgpu-demo (see Catcrafts:Demo).
SetupDemo(window);
InitializePage();
@ -34,6 +41,7 @@ int main() {
RenderRoot(Router::GetPath());
window.Render();
window.StartUpdate();
window.StartSync();
return 0;