Resonance
Paste song lyrics, then walk the world they evoke.
- Open source
- AI integration
- Web applications
- TypeScript · React Three Fiber · Vite · zod · Vitest · Claude

Summary
Resonance turns text you bring, such as song lyrics or a short passage, into a 3D world you explore in first person. There are no goals and no score: the reward is walking through a place that embodies the work, with fragments of the text built into the architecture itself.
The core idea is that the model composes rather than sculpts. The engine ships a fixed vocabulary of primitives, layouts, skies, particles, typography styles and audio beds. The model reads the text, pulls out its concrete images and emotional arc, and returns a World Spec: a JSON document that selects and tunes that vocabulary. Every catalog is a closed enum, so the output validates against zod and a bad answer gets caught instead of rendered. When validation fails, the generator retries with the error as feedback, and a minimal valid spec always exists, so you never get a blank screen.
The same spec always builds the same world, because layout comes from a seeded PRNG and Math.random is banned inside the engine. The frame budget lives in the schema too. There are three interchangeable generators: an offline heuristic one that's the default, a mock, and real Claude behind a server-side proxy, with cost, latency and tokens shown in a debug panel.
Accessibility is part of the MVP: adjustable field of view, a motion vignette, teleport movement and a reading menu with the full text, so you can take in the piece without moving through 3D at all. The README is plain about what's missing: the real Claude path is tested against simulated responses, and visual checks are done by hand in a browser.
Problem
Ask a language model to emit raw geometry and you get output you can't render, validate or reproduce.
Decision
The model composes from a closed vocabulary; it never generates geometry.
.strictObject({ version: z.union([z.literal(1), z.literal(2)]), meta: MetaSchema, environment: EnvironmentSchema, playerStart: PlayerStartSchema, zones: z.array(ZoneSchema).min(1).max(6), // perf cap: 6 zones }) .superRefine((spec, ctx) => {- strictObject: any field the model makes up triggers a retry instead of slipping through.
- The frame budget lives in the schema: 6 zones at most.
Numbers
- 128
- 3
- 6
- 0
Architecture
- 01 Pasted text
- leads to 02 Normalize
- 02 Normalize
- leads to 03 WorldGenerator: heuristic · mock · Claude
- 03 WorldGenerator: heuristic · mock · Claude
- leads to 04 World Spec
- 04 World Spec
- leads to 05 zod validation
- 05 zod validation
- leads to 03 WorldGenerator: heuristic · mock · Claude · invalid: retry
- leads to 06 Minimal fallback spec · three failures
- leads to 07 WorldRenderer · valid
- 06 Minimal fallback spec
- leads to 07 WorldRenderer
- 07 WorldRenderer
- leads to 08 Seeded procedural scene
- 08 Seeded procedural scene