Dev builds holiday card maker where Gemini writes p5.js code instead of generating pixels, for consistent style
thisiskp_ · x · 2026-11-17
thisiskp built a holiday card maker overnight where the AI never generates a single pixel: Gemini 4 "Hydrogen" writes a p5.js sketch that paints each 1080x1350 canvas shape by shape.
Key techniques:
- A long brief locks the look: round faces, dot eyes, big coral noses, long coats, chunky scarves, paper textures
- The model gets a small texture kit (paint, stripes, crayon, freckles) and is barred from raw p5 functions, so every card shares the same crayon grain
- Output must be JavaScript only, under 260 lines, no network calls
- Requests go through Netlify AI Gateway so the API key never touches the browser
- Functions, Background Functions and Blobs handle the rest
A reusable demonstration of code-generation over pixel-generation for consistent visual style.
More from coding & agent
- unslop: a Claude skill that de-slops vibecoded UI hits 17.5k GitHub stars — socialwithaayan · 2026-11-17
- KORMo-Web-11B, a Korean VLM for GUI and web agents, trends on Hugging Face — KORMo-VL · 2026-11-17
- User builds fully automated video creation pipeline with Grok Bot, friend gets hooked — XFreeze · 2026-11-17
- Google DeepMind × MIT work challenges 'more agents = better', seeks scaling principles for agentic systems — gerardsans · 2026-11-17
- Grok Bot 1.0 ships team sharing and meeting bots, both features requested by users on X weeks earlier — elonmusk · 2026-11-17
- Automated Attack-Pattern Miner Finds Real Agent Framework Flaws: 700 Paths, 3 Confirmed — _h4xr · 2026-11-17