A WebGL portfolio with zero external requests
3 min read
Open the network tab on this site and filter by third-party: it's empty. No CDN scripts, no font service, no analytics beacon, no texture hosting. Everything is either generated in code at runtime or baked by repo scripts at build time.
Why bother
Three reasons. Privacy: nothing to disclose because nothing leaves. Performance: no DNS lookups, no connection setup to third parties, and the strictest possible Content-Security-Policy without exceptions. Longevity: the site cannot rot when someone else's CDN reorganizes. A portfolio should still work in ten years.
What "generated" means in practice
The nebula, glows, lantern sprites, pipe shading, ?-block faces, star sparkles: Canvas 2D gradients drawn once into textures at startup. The music visualizer taps the site's own AudioContext. The game's sound effects and soundtrack are synthesized oscillators. The Persian calligraphy the fireflies form is baked by a build script into 620 normalized points. The bilingual poster cards are rendered by a Playwright script into PNGs, committed to the repo.
The discipline it forces
Zero-external is less a technique than a review gate: every asset must answer "who generates you, and when?" Build-time if deterministic (the tree, the posters, the calligraphy, the head sprite), runtime if trivial (gradients, glows), never "hotlink it". The colophon on the site lists the results; the backtick key shows the live draw-call count. The numbers are small because every byte had to argue its way in.