All experiments

Lab 07 Animated text

Experiment with animated text.

Adjust the controls to see random characters settle into your words, from left to right.

Loading the decoder

Work, Reimagined.

The effect moves from left to right, replacing changing characters with your final text. Choose Run again to replay it.

Fewer updates per second make the changes look more stepped.

If your device asks for reduced motion, the final text appears straight away.

How it's built

How it works~40 lines, no library
for each frame, p = elapsed / duration
for each character i (position pos = i / total):
  if p ≥ pos + sweep, the final character
  else if p < pos - sweep, a blank
  otherwise, a random glyph from the pool
spaces stay spaces; the sweep moves left to right

One animation frame loop runs the whole effect. Each frame computes progress from the elapsed time, then walks the string character by character: past the sweep the character is final, ahead of it is blank, and inside the sweep it is a random glyph from the pool.

Spaces stay spaces. The updates-per-second slider caps how often the string is redrawn by skipping frames, so a slow rate still uses one clock.

Reduced motion skips the loop and shows the final text straight away. Pause motion does the same.

How I built this site

Say hello.

Tell me what you'd like to build or improve.

Quick navigation

Find a page.

Use the arrow keys to choose a result, Enter to open it, or Escape to close.