Skip to content

Rolling Number Counter

A number that counts up like a mechanical odometer, every digit rolling into place.

Text layer, V4 Titles2D130 lines of codev1.1.0

In Text & data

Next: Kinetic Title RevealSurprise me

Rolling Number Counter 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

0
1250000
3

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

Info

What it is

Show off a big number the satisfying way: digits roll like a car's odometer from a starting value to your target, slowing down as they arrive. Add a prefix like $ or a suffix like + or 'users', choose the colour and how long it counts. Great for milestones, stats and results.

Reuse it in your own idea

  • Combine with Soft Moving Gradient and a spring pop-in label (see Minimal Animated Number Reveal).
  • Use valueAt(t) alone to drive a progress bar or a 3D bar chart.
  • Place several counters (x/y options) for a stats grid.

Which part is reusable

src/rolling-counter.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.

See it combined with other ingredients in Minimal Animated Number Reveal.

Good to know

  • Whole numbers only (no decimals).

Technical details

Technical details
Implementation
Canvas 2D — plain browser JavaScript, no libraries · ES module src/rolling-counter.js
Exports
  • createRollingCounter({ from?, to?, delay?, duration?, ease?, prefix?, suffix?, separator?, color?, fontFamily?, weight?, size?, x?, y?, align? }) => { draw(ctx, info, width, height), valueAt(t) }
Dependencies (exact)
  • apw-runtime@1.0.0 (demo) — Demo harness. src/rolling-counter.js has no dependencies.
How it fits a scene

Coordinates: Centre point as fractions of width/height; size as a fraction of the shorter side.

Lighting: None.

Timing: Pure function of time; valueAt(t) gives the exact value at any moment.

Output
1080×1080, 30 fps, 5 s · procedural (computed from the frame number) · not a loop — Counts once and holds the final number.
Tested
Rendered 150 frames on 2026-10-03 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
Two fillText calls per digit per frame. Up to 15 digits.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- rolling-counter/1.1.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.1.0 · sha256:8aef2813305461b0… · other versions: 1.0.0
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. Uses the viewer's system font. Demo and typography rebuilt in October 2026 to the catalog quality bar (docs/QUALITY.md).
BinMore like this