Skip to content

Scatter

The Scatter text effect distributes text character or word units across randomized 2D coordinate offsets, rotation angles, and scales, then animates them smoothly back to assemble the target string.


Character Dispersion and Assembly

The spreadX and spreadY parameters define the maximum pixel range boundaries for horizontal and vertical offsets.

DISPERSED

60 FPS

Word-Level Assembly

Slicing at the word-level distributes full text tokens instead of individual letters.

Assembling these fragments together.

60 FPS

Extreme Dispersion Blast

Increasing offsets and utilizing a wide random stagger timeline creates a highly dispersed explosion effect.

EXPLOSION

60 FPS

Elastic Assembly Easing

Applying an elastic ease profile (e.g. 'elastic.out') drives a bouncing spring return during assembly coordinate snap.

SPRING ASSEMBLY

60 FPS

Looping Timeline Assembly

The returned timeline can be chained within infinite repeating sequences with customized yoyo properties.

LOOP SEQUENCER

60 FPS

API Reference

javascript
import { scatter } from 'animx/plugins/Text'

const tl = scatter(target, config)

Configuration Options

OptionDefaultDescription
type'chars'Slicing unit layout: 'chars', 'words', or 'lines'.
spreadX250Maximum horizontal scatter distance in pixels.
spreadY250Maximum vertical scatter distance in pixels.
rotation180Maximum rotation angle offset in degrees.
scale0.5Starting scale multiplier of scattered elements.
duration1.2Slide timeline assembly duration in seconds.
ease'quart.out'Deceleration easing profile.
stagger{ amount: 0.6, from: 'random' }Stagger offset config object or value.
revertOnCompletefalseResets layout and removes absolute spans on complete.
pausedfalseStandard playback initialization lock flag.