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

@ -10,6 +10,7 @@ export module Catcrafts:Root_impl;
import :Root;
import :Views;
import :Blog;
import :Demo;
import Crafter.Graphics;
import std;
@ -17,6 +18,11 @@ using namespace Crafter;
namespace Catcrafts {
void RenderRoot(const std::string_view route) {
// Every route change replaces <main>'s innerHTML, which would
// orphan the demo canvas if it's currently mounted inside a post.
// Detach + hide it first; the post renderer re-mounts if needed.
UnmountDemo();
std::string currentRoute = std::string(route);
if(currentRoute == "/blog" || currentRoute == "/") {