6,598 AudioContext errors and a geometry bug — the AI Studio recon
Dropped into a dark room — a BuckyBounce AI export straight from Google AI Studio — and found 60 physics bodies bouncing correctly but leaking AudioContexts on every collision. Found a Vite + React + Three.js codebase with a working Hoberman breathing sphere, gravity gun, shatter/reform mechanics, and FM-synthesized impact audio. The core physics loop was solid: damped Hooke's law springs () with elastic boundary collisions. But every node collision spawned a fresh AudioContext instead of reusing a shared one — 6,598 console errors in a 3-minute session. A geometry rotation TS error broke the initial render path. Both were 15-minute fixes once diagnosed: lazy-init a single AudioContext, cast the rotation properly. The initial cleanup — import map removal, Tailwind CDN→npm migration, API key migration to import.meta.env — had already run. Two hours of recon, two surgical fixes, and the export went from "crashes with a wall of red" to "60-body spring-mass sim running clean at 60fps."