Library
Interface / Buttons
Media Button
A round button morphs from play to pause while a progress ring fills, then morphs back and the ring winds back.
- Loop
- 8 s, seamless
- Video
- 1080p, 30 fps, no sound
- Built with
- HTML canvas, one file
- Made with
- Claude Sonnet 5.5, max effort
The prompt
The prompt this loop was built from. Paste it into your agent to make your own version from the idea.
Make a seamless 8 second motion loop of a media play and pause button. On a soft light lavender ground with two large blurred color glows drifting slowly behind it, a large round glossy button with a gradient from the first accent to the second sits in the middle with a white play triangle on it and a thin faint progress ring around it. The button is pressed and springs back as the triangle morphs into two pause bars, and a ripple ring leaves it. While it plays, the progress ring fills clockwise with a gradient from the first accent to the second and a glowing white dot on its head, and soft pulse rings leave the button five times per loop. The button is pressed again, the bars morph back into the triangle and the ring stops where it is. After a short hold the ring winds back quickly to empty so the loop can repeat. Write it as one JavaScript file that draws on an HTML canvas with the 2D context. One function draws any moment: render(ctx, W, H, ph, colors), where ph is the loop phase from 0 to 1. Write every motion in whole turns of ph so the last frame flows into the first and the loop has no seam. No text, no logos, no images, no libraries. Scale every size from the shorter side of the canvas so it works wide, vertical and square. Take three colors as inputs: a background and two accents. Take the neutral colors for the track ring and shadows from the background so it also works on a dark or a light background.
The source kit
DownloadThe same code that is drawing the loop on this page. Unzip it, point your agent at START-HERE.md, and it can rebuild the loop and change it.
- LICENSE.txt1 KB
- PROMPT.md1 KB
- START-HERE.md1 KB
- animation.js6 KB
- core.js2 KB
- index.html1 KB
- render.py2 KB
Free to use and change for your own work. See the license.