# Vesperglass: a WebXR glass conservatory within Quest frame budgets

> Built in Three.js TypeScript as one dual-mode share link for flat browsers and Meta Quest Browser, pairing three interactive sanctuaries with strict standalone VR draw-call discipline.

- **Canonical URL:** https://gamecrew.ai/making/vesperglass
- **Engine:** Three.js · TypeScript + WebXR
- **Modes:** Dual-Mode WebXR VR & Flat Browser
- **Playable build:** https://gamecrew.ai/games/vesperglass

## Measured build & verification metrics

- **Engine & target:** Three.js TypeScript · WebXR VR
- **Standalone VR budget:** 176 draw calls · 154,810 tris (cap: 200 / 300k)
- **Automated checks (v1):** 0 audit errs · 3/3 unit · 14/14 play · 9/9 ui-check
- **WebXR emulation gate:** 45 stereo VR frames verified (controllers + 25-joint hands)
- **Mobile & desktop UI:** 7% phone · 7% phone-wide · 6% laptop overlay area
- **Sanctuaries & climax:** 3 sanctuaries + Master Carillon Bell & 14 m Aurora Pillar

## Build rounds & checks

| Round | Prompt / Focus | Effort | Scope | Verified gates |
|---|---|---|---|---|
| Stage 1 · Core & VR | Venetian lagoon conservatory with dual-mode WebXR + flat locomotion and 3 sanctuaries | 176 draw calls · 154,810 tris | Three sanctuaries: Murano Crucible, Prism Observatory, Harmonic Choir | 3/3 unit tests, 14/14 play tests, WebGL boot clean |
| Stage 2 · UI & Hands | Articulated brass gauntlets, wrist compass, touch/desktop HUD, and WebXR hand tracking | 7% / 7% / 6% HUD footprint | 9/9 ui-check captures across phone portrait, landscape & laptop | Emulated Quest 3 vr-check: 45 stereo frames, controllers + tracked hands |

## Engineering architecture

- Three complete physical puzzles share one coherent glass rotunda: thermal quartz forging at the West Murano Crucible, triple-beam dispersion alignment in the North Prism Observatory, and glass verrophone harmonics + Resonance Orb throws in the East Choir.
- Stays comfortably under standalone headset rendering limits (176 draw calls and 154,810 triangles per frame vs the 200 draw call / 300,000 triangle Quest budget) by sharing materials, keeping glass shader passes lean, and avoiding full-screen post-processing in stereo VR.
- Replaces opaque black-box WebGL previews with automated WebXR emulation (`vr-check`): both eyes draw cleanly (`xrCompatible`), head tracking updates camera pose, controller grips/triggers grab quartz or throw orbs, and bare 25-joint hands poke buttons directly.

## Key takeaways

- One URL serves flat desktop (WASD + mouse), mobile touch controls, and `Enter VR` stereo sessions without APK sideloading.
- Keeping HUD overlays under 7% of the viewport leaves glass reflections, horizon cues, and VR sanctuaries clear on both 360px phones and desktop monitors.

## Frequently asked questions

### How were Vesperglass’s 176 draw calls and 154,810 triangles measured?

During `ccgd vr-check`, an emulated Meta Quest 3 WebXR runtime renders 45 real stereo frames of the production Three.js bundle and inspects the WebGL renderer frame counters against our 200 draw-call and 300,000-triangle standalone budget.

### Can you play Vesperglass without a Meta Quest headset?

Yes. Opening `/games/vesperglass` on a desktop or phone gives full keyboard/mouse (`WASD`, `E` grab, `F` interact) or touch controls on the exact same build.

### Why build Quest experiences as Three.js WebXR links instead of native APKs?

A WebXR URL loads immediately inside Meta Quest Browser with zero cable setup or store approval wait, while every code change is tested across unit, play, UI, and emulated headset checks automatically.
