Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Tuesday, July 28, 2026atmostudio-weather-shader

Type 'cyberpunk acid rain' — every slider moves at once

Shaders

The Gemini integration isn't scaffolded — it's the whole point. You type a weather description, hit Generate, and a responseMimeType: "application/json" call to Gemini 2.5 Flash returns a typed WeatherConfig object: 15 fields covering gradient colors, cloud density and speed, rain/snow intensity, wind angle, sun position and scale, condition label, and temperature. Every slider and color picker in the sidebar snaps to the new values. The schema uses @google/genai's Type enum to constrain each field (numbers get ranges, colors get hex descriptions), and the result merges with DEFAULT_CONFIG so missing fields don't break anything. Rate-limit handling is real too — exponential backoff with 3 retries on 429s. The interesting pattern here is using Gemini's structured output as a configuration engine rather than a chat interface: natural language in, typed parameters out, no parsing step. "Cyberpunk acid rain in Tokyo" becomes a specific gradient, a specific cloud density, a specific rain intensity — all in one API call.

← Previous

AI Studio export to GitHub in 20 minutes flat

Next →

From broken export to running app in one pass


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.