Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Monday, July 27, 2026

918 lines of raw WebGL in an AI Studio zip

AI StudioWebGLShadersRecon

Opened up an AI Studio export called TerraGemini expecting a generic Three.js wrapper and found a 918-line hand-rolled WebGL renderer instead. The entire globe runs on custom GLSL shaders without a single Three.js dependency — separate vertex and fragment programs for dot-matrix land masses, graticule lines, a pulsing location beacon, and a background star field. It pulls 50m TopoJSON data from CDN, rasterizes it onto an offscreen 4096×2048 2D canvas, and runs cosine rejection sampling across the pixel data to generate ~150,000 holographic points with uniform sphere density. There is a built-in momentum physics engine for drag rotation, spring dampening on zoom, and smooth RGB lerping between day mode and amber night mode. The reconnaissance turned up the standard AI Studio detritus — a dead import map pointing to aistudiocdn.com, a missing index.css, and a Vite define block baking PLACEHOLDER_API_KEY straight into the 556KB production bundle. But the core rendering math was pristine, compiling clean across 160 npm packages with zero vulnerabilities.

← Previous

The zero-overhead inference vision: MLX vs. llama.cpp on Apple Silicon

Next →

From Hoberman sphere breathing to C60 spring-mass physics


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkBuilder’s LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.