All motions

A Negroni, explained

Recipe animation: three ingredients, one glass, levels true to the centilitre

Created with AI
  1. 0–2.6 s The recipe card — three ingredients at 3 cl each, dashed marks at 3, 6 and 9 cl in the empty mixing glass
  2. 2.6–9.3 s Measure — the jigger arrives on an arc and pours three layers, the level rises exactly 3 cl per ingredient to 9 cl
  3. 9.3–12.8 s Stir — ice drops in, the bar spoon dips in, streaks run through the layers until everything is one colour
  4. 12.8–16.9 s The counter moves, the tumbler follows — strain over one large ice cube, the orange peel sprays its oil and lands on the rim
  5. 16.9–20 s Serve — the frosted glass as the hero shot with one last glint, then the counter moves on to the empty mixing glass
  • Explainer
  • 20 s Loop
  • 1080² · 30 fps
  • Canvas 2D
  • 739 KB

Prompt

English · for Claude Code, Codex & co. · 945 words
Build a 20-second looping recipe explainer, 1080×1080: a Negroni from the empty mixing glass to the finished drink, as a flat, precise editorial illustration — not clip art. All on-screen text comes from one small dictionary; ?lang=de switches to German. No brand names: "Red bitter", "Sweet vermouth", "Gin".

DESIGN
Warm cream #F4EEE4, a large soft disc #EAE1D2 behind the glassware, a thin counter line, ink #231D1A, muted #8C8074. Glass is line art: 2.5 px ink outline, translucent white body, thick base, elliptical rim. Light always comes from the upper left: one strong highlight strip on the left, a faint reflection on the right, a specular on the rim, soft three-step contact shadows that travel with each vessel and thin out when it is lifted. Liquids are flat: red bitter #B5212C, sweet vermouth #6B2C1C, gin a pale mint #CFE2DA, the stirred drink #A52A21; each surface is a lighter ellipse with a meniscus at both walls, layer boundaries slightly diffused. Ice cubes have inner facets. Instrument Serif for the title "Negroni", Geist for labels, Geist Mono for every quantity — always set the same way: tabular figure, fixed gap, "cl". Left column: kicker, title, subline, ingredient rows (swatch, name, "3 cl", a hairline that fills in the ingredient colour exactly in sync with the pour), "Total 9 cl", then a caption block "STEP 0n / 05" with a two-line sentence whose line breaks are set by hand. Bottom: five stations (Measure, Stir, Strain, Garnish, Serve) on one line that fills.

STORYBOARD
0–2.6 s  Recipe card. The empty mixing glass carries a cl scale (ticks per cl, labels 3/6/9/12) and dashed guides at 3, 6 and 9 cl; rows, guides and labels light up one after another, then "Total 9 cl".
2.6–9.3 s  Measure. A double jigger (3 cl cup) arrives on an arc, settles, takes a small breath and tips over its lip, densest ingredient first: red bitter, sweet vermouth, gin. Every stream has a beginning (bead, first drop), tapers as it falls, thins, tears off and ends in two or three last drops; rings and small bubbles where it lands. Each layer rises exactly 3 cl (24 px per cl); a dark pill grows out of its leader line, rides the surface and counts up to 9.0 cl.
9.3–12.8 s  Stir. The scale retracts tick by tick, four ice cubes fall in from above, dip under and bob up, the level rises by what they displace. A twisted bar spoon dips in; streaks of each ingredient are pulled through the others and the boundaries wave before everything settles into one colour. A ring timer counts 0 → 30 s; the spoon leaves with two drops.
12.8–16.9 s  Strain and garnish. The counter moves: the mixing glass glides right, a tumbler with one large cube follows in from the left. A strainer swings in and is set down; the glass lifts, swings over the tumbler and pours — the big cube lifts off the bottom and bobs. The glass rights itself and returns. An orange peel with thickness and a pale inside flies in on an arc, is squeezed over the drink (a fine oil mist for about 0.4 s, an oil film on the surface) and lands on the rim with a small rock.
16.9–20 s  Serve. The mixing glass leaves on the right, the tumbler moves to the centre and grows to 1.15 as the hero with a "9.0 cl" pill; 1.5 s of calm with condensation, one running drop and a last glint across the glass. Then the counter moves on: the drink is pulled out to the right, the empty mixing glass arrives from the left, so frame 0 = last frame.

MOTION
Nothing fades in or out: objects enter and leave in a direction that fits the action (whatever comes from the left is wiped in behind a soft mask so it never crosses the text). Captions change through a per-line mask — the old line leaves upwards, only then the new one rises in — and the station dot fills at that moment. Volumes are real: liquid in any tilted vessel is the interior polygon clipped below a horizontal line, the line solved by bisection on the area; while pouring the level is pinned to the lip, so the tilt angle is solved from the volume left. The tumbler receives exactly what the mixing glass gives. Surfaces slosh with small damped sines and come to rest. Critically damped springs normalised to land exactly on 1.

TECHNIQUE
- One self-contained HTML page plus one JS file (no inline script, no libraries, no network requests). Stage exactly 1080×1080 CSS px, or the size named above (1080×1920 for portrait).
- Expose window.MOTION = { duration, fps: 30, width, height, seek(t) } with the stage size in width and height. seek(t) redraws the frame for time t from scratch: no state between frames, no Math.random (seeded PRNG only), no Date, no CSS transitions, no timers.
- Loop: seek(0) and seek(duration) must look identical.
- With ?render=1 the stage sits unscaled at the top left (for frame capture). Without it, scale the stage to fit the window and loop with requestAnimationFrame.
- prefers-reduced-motion: show one representative still, no loop.

CHECK
Render stills at the listed times, look at every one, fix anything that overlaps, is cut off, aliased or unreadable, then render again. Report only when frame 0 equals the last frame.
Stills: every 0.1 s around each transition (2.6, each pour, 9.3, 12.8, the tilt, the garnish, 16.9, 19.2 → 0.5), every 0.5 s in between, in both languages, plus 2× crops of rim, stream, ice, peel and labels; frame 0 must equal frame 19.97.

How to recreate it

  1. Give the prompt to a coding agent

    Create an empty folder and paste the prompt into Claude Code, Codex or Cursor. The agent writes one HTML page and one script — the animation then runs right in the browser.

  2. Let it check the stills

    The prompt makes the agent render stills and look at them itself. Only refine what you don't like in the picture: “scene 3 is too busy” works better than a new prompt.

  3. Render to MP4

    Because every animation can draw any frame exactly through window.MOTION.seek(t), a small script renders it frame by frame — no stutter, no screen recording. Then ffmpeg joins the frames into a clip.

Render commands Download render.mjs
# 1 · Render every frame (Chrome, Node ≥ 22)
node render.mjs http://localhost:3000/ \
  frames/ frames 30

# 2 · Join the frames into an MP4
ffmpeg -framerate 30 -i frames/%05d.png \
  -c:v libx264 -preset slow -crf 22 \
  -pix_fmt yuv420p -movflags +faststart \
  my-motion.mp4

How a clip is built with Claude Code

Background

A recipe as a motion graphic: a jigger pours red bitter, sweet vermouth and gin at 3 cl each into a mixing glass, the layers climb the scale to 9 cl, ice and a bar spoon stir them into one colour, then it is strained, garnished with an orange peel and served. 20 seconds, English and German, with the prompt.

What I learned building it

An explainer about quantities is only convincing if the quantities are right. So I solve every level from its area, even in a tilted glass. That way the tumbler receives exactly the 9 cl that were measured.

Inspiration

The starting point was a prompt by @Ror_Fly ((opens in a new tab)) on Skillry. You'll find the original wording there; the prompt above is my own version.

More motions

Contact

Let's discuss
your project
together.

Send me a message or fill out the contact form. I'll get back to you within 24 hours.

Paul Mill

Paul Mill

hallo@paulmill.com