Skip to content

SineWave

The SineWave text effect translates text units vertically using staggered sinusoidal offsets, generating wave-like oscillations or wiggling motions.


Basic Character Wave

The amplitude option determines the vertical translation range in pixels. Phase-shifting is controlled by staggering unit delays.

PROPAGATING WAVE MOTION

60 FPS

Word-Level oscillation

Setting the slicing unit to 'words' translates complete word blocks vertically.

Floating words in space.

60 FPS

High-Frequency Oscillation

Increasing amplitude and reducing the oscillation cycle duration generates a tall, rapid vertical flutter.

RAPID_OSCILLATION

60 FPS

Wide Wavelength Configuration

Increasing the stagger offset delays subsequent characters further, stretching out wave peak distances.

STRETCHED WAVE

60 FPS

Composite Diagonal Swapping

Additional horizontal translation parameters can be composed on the underlying character spans using the returned timeline sequence.

COMPOSITE SWAY

60 FPS

API Reference

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

const tl = sineWave(target, config)

Configuration Options

OptionDefaultDescription
type'chars'Slicing layout unit: 'chars', 'words', or 'lines'.
amplitude10Vertical oscillation offset limit in pixels.
duration1.0Time in seconds to complete one vertical sinusoidal cycle.
ease'sine.inOut'Sinusoidal loop interpolation easing.
stagger0.05Phase shift delay between subsequent text units in seconds.
repeat-1Loop iterations count. Default is -1 (infinite looping).
yoyotrueReverse translation direction at the end of each cycle.
revertOnCompletefalseResets layout and removes absolute spans on complete.
pausedfalseStandard playback initialization lock flag.