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

@ -282,6 +282,34 @@ main {
opacity: 1;
}
/* Embedded ray-traced WebGPU demo (see Catcrafts:Demo). */
.webgpu-demo {
margin: 2.5rem 0 1rem;
}
/* Host box the Crafter.Graphics render canvas is reparented into. It must
have a resolved height for getBoundingClientRect() (the canvas is
absolutely positioned inside it), so the size comes from aspect-ratio.
The dark fill + border frame it before the first traced frame lands. */
.webgpu-demo-canvas {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
border-radius: var(--border-radius);
overflow: hidden;
background: #05060a;
border: 1px solid rgba(255, 255, 255, 0.12);
box-shadow: var(--box-shadow);
}
.webgpu-demo-caption {
margin-top: 0.85rem;
font-size: 0.95rem;
line-height: 1.6;
color: var(--text-secondary);
text-align: center;
}
/* Footer */
footer {
background-color: var(--dark-color);