Alle Motions

Quallen im Lichtschacht

Naturaufnahme aus Code: durchscheinende Quallen, jede auf eigenem Rhythmus

Created with AI
  1. 0–5 s Eine große Qualle steigt durch den Vordergrund, dicht an einer kleineren vorbei
  2. 5–9 s Zwei Quallen begegnen sich im Mittelwasser, eine kreuzt hinter den Tentakeln der anderen
  3. 9–12,5 s Ein Lichtschacht trifft eine Glocke nahe der Oberfläche, Kaustik und Gonaden leuchten auf
  4. 12,5–15,5 s Der Schacht wandert weiter und holt einen fernen Schwarm aus dem Dunst
  5. 15,5–18 s Der Schwarm löst sich auf, die nächste Glocke steigt von unten auf – zurück zum ersten Bild
  • Organischer Loop
  • 18 s Loop
  • 1080² · 30 fps
  • Canvas 2D
  • 2,3 MB

Prompt

Englisch · für Claude Code, Codex & Co. · 983 Wörter
Build an 18-second seamless loop, 1080×1080, in Canvas 2D and plain JavaScript (no libraries, no image, font or audio files): translucent jellyfish in deep petrol-blue water, shot like a nature film. No text in the picture.

DESIGN
Water: a vertical gradient from #0B5661 at the top to #021E27 at the bottom, a wide cyan glow from above left, a faint coral glow from below right, dithered against banding, a soft dark vignette. Four slanted cyan light shafts drift slowly sideways; each is a broad soft body with two narrower rays breathing inside it, fading out towards the depth.
Jellyfish in depth layers: one near and large (bell radius 166 px, sharp), one in mid water (86 px, sharp), one slightly behind it (62 px, a little soft), three far ones (27–34 px, pale, blurred) and a swarm of nine tiny ones that only appears for a few seconds. Far ones are drawn on low-resolution layers and blurred; every animal is composited onto the water with "screen".
The bell is a real body, not an outline: a cap of revolution seen slightly from below, with an outer and an inner wall (thick clear jelly at the crown, thin at the margin), 16 radial canals (every other one forks towards the margin on the large animal), four ruffled coral gonad rings around the crown joined by a stomach cross, a margin line that ripples, a short velum with 16 lappets, and a small cyan light in every notch. Light gathers at the edges: wide soft strokes clipped to the bell, cyan on the lit side, coral on the far side. Two families of wandering caustic lines shimmer on the upper bell, a soft sheen sits on the crown, and a faint cyan body of light surrounds each bell. Four oral arms hang from a short stalk as ruffled, translucent coral ribbons. 16–28 hair-thin tentacles per animal, pale cyan at the root and coral towards the tip, with tiny knots on the large one.
Marine snow in three layers: far specks, mid specks, a few large out-of-focus discs in front. Each particle fades in, sinks and drifts for one loop, and brightens inside a light shaft.

STORYBOARD
0–5 s  The large jellyfish rises from the lower right through the foreground, heading up and left, passing close to the mid-water one; the third enters from the right edge.
5–9 s  The large one leaves at the top left, its tentacles trailing across the frame. The two smaller ones meet in mid water: one climbs, the other crosses behind its tentacles.
9–12.5 s  The brightest light shaft comes to rest on the climbing bell near the surface: caustics, gonads and crown light up; then it banks into a turn and one strong stroke carries it out through the upper right.
12.5–15.5 s  The shaft wanders on to the left. The crossing jellyfish shrinks and blurs as it swims away, and a swarm of tiny jellyfish lifts out of the haze where the light now falls.
15.5–18 s  The swarm dissolves, the mid-water jellyfish rises again from below, the crown of the large one reaches the bottom edge — the first frame.

MOTION
One pulse curve for all: the bell squeezes in 15 % of the period and recovers over the next 80 %. Thrust is the positive rate of that squeeze; speed is the periodic solution of v' = thrust − drag·v, so each stroke gives a lunge and a glide. Every animal has its own period (the loop divided by 6, 7, 8, 9, 10 or 12) and phase. The margin lags the bell by 5 % of the period, the velum by 12 %, and the bell nods slightly into each stroke.
Each jellyfish owns an endless path: integrate speed along a gently swaying heading over one loop into a table and remember the displacement per loop. Draw the copies at t − 18, t and t + 18; large animals wrap off screen, far ones while they are faded into the haze, so the loop closes by construction.
Tentacles and oral arms are not simulated: each link samples the bell's own past — position, heading and margin width — with a delay that grows along the chain, the squeeze rounded off and damped further down, plus a travelling sway and a slow common drift. They stretch after each stroke and catch up during the glide.
Marine snow knows when a bell passes closest and how near; from that moment it is dragged along the bell's heading in steps, pulled towards the wake, then released. The camera drifts a few pixels, nearer layers moving more. The margin lights flash with each stroke, running round the rim, and fade while the bell refills.

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 second from 0 to 18, every 0.1 s around 5, 9, 12.5 and 15.5 and from 17.5 to 0.5, plus 2× crops of the large bell at 3.4 and 4.0 and a 3× crop of the lit bell at 10.6.

So bauen Sie es nach

  1. Prompt in einen Coding-Agenten geben

    Einen leeren Ordner anlegen, den Prompt in Claude Code, Codex oder Cursor einfügen. Der Agent schreibt eine HTML-Seite und ein Script — die Animation läuft danach direkt im Browser.

  2. Standbilder prüfen lassen

    Der Prompt verlangt, dass der Agent Standbilder rendert und selbst ansieht. Schärfen Sie nur nach, was Ihnen am Bild nicht gefällt: „Szene 3 ist zu voll“ wirkt besser als ein neuer Prompt.

  3. Zu MP4 rendern

    Weil jede Animation über window.MOTION.seek(t) jedes Bild exakt zeichnen kann, rendert ein kleines Script sie Bild für Bild — ohne Ruckler, ohne Bildschirmaufnahme. Danach setzt ffmpeg die Bilder zum Clip zusammen.

Befehle zum Rendern render.mjs herunterladen
# 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

So entsteht ein Clip mit Claude Code

Hintergrund

Durchscheinende Quallen in tiefem, petrolblauem Wasser: Die Glocken ziehen sich schnell zusammen und erholen sich langsam, jeder Stoß gibt einen Satz nach vorn, Tentakel und Mundarme ziehen verzögert nach. Cyanfarbene Lichtschächte wandern durchs Bild, Meeresschnee treibt in drei Tiefenebenen. 18 Sekunden Canvas 2D, ohne Bibliothek, mit Prompt.

Was ich dabei gelernt habe

Glaubwürdig wird die Bewegung nicht durch eine Simulation, sondern durch die richtige Reihenfolge: Erst der Stoß, daraus die Geschwindigkeit, daraus die Bahn. Die Tentakel tasten diese Bahn dann nur noch verzögert ab. So bleibt jedes Bild berechenbar, und die Schleife schließt sich von selbst.

Inspiration

Ausgangspunkt war ein Prompt von @AntSeed ((öffnet in neuem Tab)) auf Skillry. Den Wortlaut finden Sie dort; der Prompt oben ist meine eigene Fassung.

Weitere Motions

Kontakt

Lassen Sie uns
Ihr Projekt
besprechen.

Schreiben Sie mir eine Nachricht oder füllen Sie das Kontaktformular aus. Ich melde mich innerhalb von 24 Stunden.

Paul Mill

Paul Mill

hallo@paulmill.com