Skip to content

Wave Text

A line of bold text that ripples like a flag: every letter rises, tilts and changes colour as a wave passes along it. Loops perfectly.

Text layer, V4 Titles2DSeamless loop, verified80 lines of codev1.0.0

In Liquids, Text & data

Next: Digital RainSurprise me

Wave Text 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

2
1

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

Info

What it is

A line of text that ripples like a flag in the wind. Every letter rides a travelling sine wave: it rises and falls, tilts with the slope of the wave, swells a little on the crest and shifts colour along a gradient as the wave passes. The wave makes a whole number of cycles per loop, so it repeats forever. Type the words, pick a gradient (sunset, ocean, mint or mono), how many waves run through the line per loop, how high they rise and the backdrop colour.

Reuse it in your own idea

  • Sale banner: Sunset, two waves.
  • Calm title: Ocean, gentle.
  • Energetic drop: Mint, lively.

Which part is reusable

src/wave-text.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.
  • There is no line wrapping.

Technical details

Technical details
Implementation
Canvas 2D — plain browser JavaScript, no libraries · ES module src/wave-text.js
Exports
  • createWaveText({ text?, gradient?, waves?, amplitude?, weight?, maxWidth?, fontFamily? }) => { draw(ctx, info, width, height) }
  • GRADIENTS: { sunset, ocean, mint, 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 line is scaled to fit 84% of the width; wave height is a fraction of the type size.

Lighting: A soft drop shadow lifts the letters.

Timing: Pure function of info.progress (or time and duration).

Output
1080×1080, 30 fps, 6 s · procedural (computed from the frame number) · seamless loop — The wave makes a whole number of cycles per loop, so the last frame meets the first.
Tested
Rendered 180 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. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
One fill per letter per frame; negligible. One line only; best under about 20 characters.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- wave-text/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:93cd4f46bbf1c919…
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