Skip to content

@modoki/engine / index / TextAnimation

Variable: TextAnimation

const TextAnimation: Trait<{ amplitude: number; effect: string; fadeIn: boolean; frequency: number; loop: boolean; speed: number; }>

Procedural per-glyph animation for a Text3D/Text2D entity. A modifier trait — attach it alongside a text trait and the renderers apply the effect per glyph each frame (while playing; frozen when stopped, like skeletal). The motion is computed procedurally from (glyph index, engine time, params) — see runtime/rendering/text/textAnimate.ts — so it works on dynamic/CJK strings of any length with no per-glyph authoring.

Built with Modoki.