Skip to content

Countdown Ring

A countdown where a thick ring sweeps down for every number, digits drop in under a mask, and the final word lands with a flash.

Text layer, V4 Titles2D100 lines of codev1.0.0

In Text & data

Next: Kinetic Title RevealSurprise me

Countdown Ring preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source.

Open in the title maker

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

5

Shown at zero. Leave empty for none.

1

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

A countdown that counts with a ring. A thick arc sweeps away round a dial, one full sweep per number; at each tick the digit snaps out and the next drops in under a mask, a pulse leaves the ring and tick marks light up as they are passed. At zero the ring closes, flashes and the final word lands. Choose the number to start from (2 to 10), the final word (or none), the colours (electric, sunrise, lime or mono), the seconds per number and the backdrop colour.

Reuse it in your own idea

  • Launch: Electric, five to go.
  • Live stream: Sunrise, ten.
  • Quick count-in: Lime, three.

Which part is reusable

src/countdown-ring.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • System fonts differ between computers; pass fontFamily and load the font first for identical renders.
  • Counting down from more than ten, or at under half a second per number, will not fit the 8-second clip.

Technical details

Technical details
Implementation
Canvas 2D — plain browser JavaScript, no libraries · ES module src/countdown-ring.js
Exports
  • createCountdownRing({ from?, final?, theme?, per?, start?, fontFamily? }) => { draw(ctx, info, width, height), revealDuration }
  • THEMES: { electric, sunrise, lime, mono }
Dependencies (exact)
  • apw-runtime@1.0.0 (demo) — Demo harness. The reusable source has no dependencies.
How it fits a scene

Coordinates: Centred; the ring has a radius of 330 on a 1080 canvas and scales with the smaller side.

Lighting: The ring glows in the theme colour; the demo adds a soft pool of it behind.

Timing: Pure function of time; one number per `per` seconds after a 0.4 s start; revealDuration says when the final word has landed.

Output
1080×1080, 30 fps, 8 s · procedural (computed from the frame number) · not a loop — Not a loop: it counts down and ends on the final word (or an empty, closed ring).
Tested
Rendered 240 frames on 2026-10-08 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (Canvas 2D). Same frame twice from fresh pages: identical.
Performance
A few arcs and 60 tick marks per frame; negligible. The final word is best under about six characters.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- countdown-ring/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:c731466575b271dc…
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Original code written for AI Pixel Wizard in October 2026, to the catalog quality bar (docs/QUALITY.md).
BinMore like this