# Rose Glazing

> A seeded rose window in a stone wall leads and glazes itself from the centre out, and a movable sun throws its coloured light across the paved floor.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Interactive 3D](https://www.sandbase.ai/skills/interactive-3d)
- Version: 1.0.1
- Runs online: yes
- Page: https://www.sandbase.ai/skills/interactive-3d/rose-glazing

## What you get

Bring a design number and an hour of light. The Skill returns a downloadable Skill and a runnable stained-glass scene.

## Install

Download the Skill package from https://www.sandbase.ai/skills/interactive-3d/rose-glazing (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/rose-glazing build a stained-glass rose window scene for <your design and hour of light>
```

## How it works

1. **Seed a rose window design** Rose Glazing turns one seeded design number into a full window through design(opus) in src/tracery.js. The number picks the petal order of 8, 10, 12 or 16, one of seven colourways and the head shape, then lays out five zones: an oculus with a star or foil, chevron-banded lancet petals, spandrel medallions, a ring of small lancets and medallions, and a rim of quarries.
2. **Build the bilingual page locally** Run npm install, which fetches playwright-core for the checks only, then npm run build for a bilingual dist/index.html, or npm run build:zh for a Chinese-only page. Everything is Canvas 2D on your machine with no image assets and no network requests. The Glazier schedule strikes leads from the centre out and sets glass zone by zone, so the window assembles within the first second.
3. **Shoot the mechanism and verify** npm run shoot runs headless Chrome with the network blocked and asserts 12 petals and five zones in the first design, centre-to-rim leading, n-fold petal mates, top and bottom balance and a light gain at or above 0.6 across the dial. It writes dist/shoot-report.json and shoot-glaze.png. Then node assets/wheel/scripts/verify.mjs proves five live interactions under the sandbox CSP.

## FAQ

### What does Rose Glazing draw?

Rose Glazing draws a round stained-glass window set in a deep stepped embrasure of coursed ashlar, above a floor of lozenge flags. The window leads and glazes itself, then its coloured light falls through a dusty shaft with drifting motes into a pool on the floor that moves with the sun. Each pane carries its own shade, mottles, a seed bubble and matting.

### How do I move the light in Rose Glazing?

Rose Glazing moves the sun when you drag across the wall or use the arrow keys. The sun dial at the bottom right takes a drag on its bead or arrow keys once focused, and left alone the sun walks across it slowly. Press and hold the stage to gather a brighter shaft, and tap, press N or use the top-left chip for a new design.

### Does Rose Glazing need a key or a paid service?

No. Rose Glazing paints the glass, stone and light in Canvas 2D code and makes no runtime model call or network request. The only install is playwright-core, used by the headless checks, so generating new designs by tapping costs nothing on SandBase. It is a download-only scene with no hosted run.

### Can the glass in Rose Glazing go dark at night?

No. Rose Glazing multiplies the set glass by the light of the current hour but never lets the gain fall below 0.64, so every hour on the dial keeps the window lit. When you cut a new design, the old glass stays lit underneath while the new leads go in, then fades out.

### Is the Rose Glazing floor pool a real caustic?

No. Rose Glazing maps a small copy of the lit window onto the floor by an affine projection, so the pool is soft rather than sharp-edged like a ray-traced caustic. A colour spill on the wall uses the window's average colour.

### Can Rose Glazing be recorded frame by frame?

Yes. Rose Glazing exposes window.__scene with ready, cover settings, script(t), step(n, dt), inspect(), state(), newDesign, setSun, gather and lightAt. Adding ?capture=1 stops the animation loop so a recorder can drive frames.

## Examples

- Rose Glazing stained-glass window (scene)
- A Wheel of Glass (video)
