I'll build an immersive WebGL disco ball simulation — a real-time fragment shader with a raytraced mirror ball, rotating light beams, a pulsing dance floor, plus a synthesized disco beat engine and a mixing-deck style UI. Let me first explore the project structure.
Now let me read the key configuration files to understand the setup.
Tailwind v4 setup confirmed. Let me install lucide-react for icons and set up the HTML shell with fonts in parallel.
Now the core of the experience — the WebGL renderer with a custom fragment shader that raytraces the mirror ball, rotating beams, and the dance floor. Creating it alongside the global stylesheet.
Now the audio engine (synthesized 116 BPM disco groove) and the main App with the mixing-desk HUD.
Now let me fix the fader rotation direction so maximum value sits at the top, then build the project.
The build succeeded. The disco ball simulation is complete and auto-starts on load. Here's what was created:
MIRROR BALL SS-79 — Real-time Disco Simulation
The Simulation (src/gl/disco.ts)
A single custom WebGL fragment shader that analytically raytraces the entire club scene — no libraries, pure math:
- Rotating mirror ball — 338 individually quantized mirror facets (26×13 lat/long grid) with per-facet normal jitter. Each tile acts as a real chrome mirror, reflecting the environment and beams, producing dancing specular star-glints, grout seams, and random per-tile twinkle pulses synced to the beat
- 8-beam projector array — rotating, tilt-oscillating light beams radiating from the ball with volumetric haze shafts (ray-to-segment distance glow) and stretched color pools projected onto the floor
- Dance floor — glossy checkerboard with randomly pulsing color tiles, a rotating mirror-dot lattice, beam hotspots, and a fresnel sheen that reflects the ball itself
- Color cycling — every element (facets, beams, floor tiles, god-ray fan) flows through the HSV wheel continuously
- Party atmosphere — rotating god-ray fan behind the ball, purple horizon haze, distant glinting crowd sparkles, film grain, scanlines, vignette, and a beat-pulse envelope driving everything at 116 BPM
The Sound (src/audio/engine.ts)
A fully synthesized disco groove (Web Audio, zero samples): four-on-the-floor kick, offbeat hats with 16th-note swing, triple-burst claps, funky octave-jumping bassline over an A–F–C–D progression, and detuned saw pads with chord stabs. The real-time beat envelope feeds back into the visuals, so audio and light are locked together.
The Desk (src/App.tsx)
A mixing-deck HUD styled like studio hardware:
- 4 vertical chrome faders — SPIN, COLR FLOW, BEAM PWR, HAZE — all mapped live to shader uniforms
- DROP NEEDLE audio toggle, STROBE flash toggle, and 3 vibe presets (ULTRAVIOLET / GOLDEN HOUR / ACID FUNK)
- Beat-synced pulse light, session clock, scrolling ticker, chrome-gradient display type (Unbounded), and cursor-driven camera parallax
The simulation boots instantly on mount — no interaction required. Drag a fader or move your cursor to conduct the room.
Files built: index.html, src/gl/disco.ts, src/index.css, src/audio/engine.ts, src/App.tsx