Toy Room Grand Prix
A voxel toy-room commercial on a sunny afternoon: a red race car launches off a desk, loops the loop in bullet time and jumps the RACE blocks, while a tin robot waddles, a wooden train puffs cotton-ball smoke and a biplane circles on a string.
Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.
Starting prompt
Build "Toy Room Grand Prix": a real-time 3D toy commercial in a premium voxel style. A child's bedroom on a sunny afternoon, seen at toy scale: a red race car runs an orange track off the desk, through a loop-the-loop and over a jump, while the other toys play. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally (data or canvas textures are fine), no external models or image files. Every toy is an original design: nothing from existing films, games or brands, no logos, and no people anywhere (no child, no hands). The look, one art direction for everything: - Everything is made of cubes, like a voxel diorama. Write a mesher that emits only exposed faces, with classic per-vertex ambient occlusion and a slight per-voxel tint. The voxel size follows the object: 3 cm floorboards, 2.5 cm walls, 0.5 cm toys, 0.2 cm for the car. Large flat surfaces may be one quad with a nearest-filtered per-voxel colour texture. No smooth, photoreal objects. - Soft, warm light: a low sun through two windows and a dim image-based fill. The sun reaches the room only through the openings: test each fragment analytically against the window rectangles (mullion cross included) along the sun direction, plus one shadow map that covers just the two light prisms. Raymarch the same test for soft light shafts and let tiny voxel dust motes sparkle only inside the beams. - A shallow depth of field sells the miniature scale. Keep a sharp zone as deep as the subject; use a half-resolution gather bokeh where foreground blur spreads over sharp backgrounds but never the reverse. ACES tone mapping and a gentle vignette. The room (centimetres, y up, about 480 × 520 × 260): - Honey plank floor; a cream wainscot up to 90 cm; above it, deep teal wallpaper with little yellow stars, tiny ringed planets and crescent moons. Two windows on the back wall with mustard curtains and a bright garden outside. A clock, bunting, a sailboat picture. - A 60 cm desk with a glowing coral arm lamp, pencils and a crayon drawing. A bookshelf of voxel books and a globe. A bed with a patchwork quilt, where a caramel teddy bear in a blue striped scarf sits. An open navy toy box with yellow stars. A rug with coral, cream and mustard bands round a teal field. - 5 cm alphabet blocks with recessed panels and raised letters: towers of them hold up the ramp, and a row spelling RACE sits under the jump. The track and the car: - The track is a chain of 1 cm voxel slices, 7 cm wide with two rails, bent along a smooth curve. It starts at a chequered line and a striped barrier on a stack of books on the desk, dips onto the desk, plunges over the edge down a 40° ramp, runs through a 32 cm teardrop loop (shifted sideways so the exit clears the entry), climbs a 20° kicker, jumps a gap above the RACE blocks and lands on a ramp angled from the computed flight path. Ease the curvature in and out (half-sine) so the car never leaves the track over a crest. - The car: 9 cm, red with white stripes, a white 7 on the doors and bonnet, tinted windows (no driver), silver-hubbed wheels and a rear wing. - Real physics, precomputed at load: gravity along the track, rolling resistance on the normal force (including v²κ in the loop) and air drag. Then a ballistic flight, a small bounce on landing, and a spinning slide to a stop, with cotton-ball dust puffs. The car sits on its front and rear contact points; its wheels turn at distance ÷ radius. The other toys: - A wooden steam train (engine, tender, wagon) circles an oval wooden track on the rug, puffing cotton-ball smoke that rises, grows and shrinks away. - A silver tin wind-up robot with yellow ring eyes, a dial panel and a turning brass key waddles in a circle inside the oval, rocking and swinging its arms. - A red and yellow biplane circles on a string from the pendant lamp as a true conical pendulum. Its string angle follows from its period, it banks along the string, and its propeller blurs into a disc. The film is one seamless 48 s loop driven by the clock. A periodic, monotone slow-motion time map runs through the car's computed events, and every animation follows it, so slow motion slows the whole world. Train laps, plane laps, robot steps, puffs and dust drift are whole numbers per loop. Seven eased shots, joined by cuts: 1. 0–9 s "Sunny Afternoon": a slow dolly across the sunlit room. 2. 9–13 s "On the Grid": a low macro on the desk. The barrier lifts and the car rolls towards the lens. 3. 13–18.4 s "Down the Ramp": onboard behind the car, down the ramp and up into the loop as the world rolls over. 4. 18.4–23 s "Upside Down": from below and beside the loop, bullet time (about 0.02×) while the car hangs at the top. 5. 23–33.5 s "Big Air": a floor-level side view of the slow-motion flight over RACE. As it lands, the camera swings round to catch it spinning out and stopping nose to the lens. 6. 33.5–41 s "Tin & Steam": a low close-up of the robot walking towards the lens, with the train passing behind. 7. 41–48 s "Up and Away": the biplane circles past the lamp and windows while the car is reset to the start out of view. Interface: only a small corner caption with the title and the current shot name. Drag to orbit, keeping the camera inside the room; it eases back to the film a few seconds after the last input. Everything moves from the first frame. On a phone in portrait, widen the view to keep each subject in frame. Engineering rules (the page must work on the first load, with no fixes): - Use Three.js r170 and only methods that exist on its classes. Give every custom ShaderMaterial `fog: false` and declare every uniform, constant and varying its shaders use. - Take time from the rAF timestamp, never from accumulated dt. Support `?t=SECONDS` to start at that loop time and `&freeze=1` to hold that frame. - Keep it at 60 fps: merge the static voxels into a few big meshes, skip hidden faces, instance repeated parts, cap the pixel ratio at 1.5 and lower it under load, and allocate nothing per frame. Before the first frame, build everything, compile every program and render every shot once, so nothing stalls at a cut or at the loop wrap. - It runs in a sandboxed iframe without same-origin access: no localStorage, sessionStorage or cookies. - Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes. Keep planning brief and write the code: roughly 1,100 to 1,500 lines, compact and clear.