Skip to main content
Version: 5.x
Supported on
Snapchat
Spectacles

Text3D Animator

Use Text3D Animator in Lens Studio to animate groups of objects with curves: scale, rotation, position, and optional material properties. It can drive 3D Text, prefabs, child objects, or any list of SceneObjects you assign, all controlled from one component in the Inspector with presets or custom curves.

New to Text3D Animator? Leave Use Presets on. Pick a preset and Target Type, preview your Lens, then change direction, duration, and offset. Turn off Use Presets under Advanced setup when you need full control over each curve.

Getting Started

Installation

  1. Open the Asset Library in the upper left of Lens Studio. In the search field, type text3d or Text3D Animator.

    Asset Library search for Text3D Animator Text3D Animator in search results
  2. Install the Text3D Animator component and its package.

    Install Text3D Animator from Asset Library

Target Settings

Target Types

Target Type chooses how the component builds the list of objects to animate:

TypeDescription
ObjectsUses the Targets array. Add the SceneObjects you want, in the order they should run.
ChildrenUses every direct child of the SceneObject that has Text3D Animator. You don't fill Targets.
Text 3DSplits 3D Text on the same object into per-character meshes, then animates those pieces in order.
PrefabSpawns an instance of Prefab under this object. Set Prefab Content Type to Children to animate that instance's children, or Text 3D to split and animate it.

In/Out Preset Parameters

Pick a preset from the Preset dropdown to set the curves for the In and Out phases.

Preset dropdown showing Jump, Overshoot, Bounce, S-Curve, Smooth, Popup, Typewriter, Wave

A full animation runs in three phases: an In entrance, an optional Idle loop, and an Out exit. The chosen preset drives the In and Out curves; Idle is configured separately.

In, Idle and Out

When you turn on Use Presets, you can adjust:

ParameterTypeDescription
DirectionenumHow motion runs along text or through a list of objects.
Left to Right
From Center
Random
Invert DirectionbooleanReverses Direction. Available for all modes except Random.
DurationnumberLength of the animation in seconds.
OffsetnumberDelay between each object's start time. Sets the phase.

Idle Parameters

Turn on Idle with the Enabled checkbox. Then set:

ParameterTypeDescription
DurationnumberLength of the idle phase in seconds.
Wave TypeenumShape of the looping wave.
Sine
Triangle
Square
Sawtooth
Wave LengthnumberFrequency of the wave across the target list.
SpeednumberWave speed multiplier.
Rotation Strengthvec3How much objects rotate on each axis.
Position Strengthvec3How much objects move on each axis.

Advanced Setup

Manual Curves

Turn off Use Presets to edit by hand. Turn on Scale, Rotation, and Position one by one.

For Position, use Invert Position Alternate to swap direction for each object. Set 1 on an axis to flip motion on that axis for every other object.

Custom Property

Turn on Custom Property. Type your material Property Name. Control how objects show or hide with the material or your own effects.

Callbacks

The component adds four EventCallbackSettings lists in the Inspector: Animation In Start, Animation In Complete, Animation Out Start, and Animation Out Complete. Each list runs its items in order at the matching event.

For each callback item, pick one of these:

TypeDescription
Behavior ScriptCalls trigger() on a Behavior script you pick.
Behavior Custom TriggerSends a named custom trigger with behaviorSystem.
Custom FunctionCalls a named function on another script. You can pass extra data on this path.
Callback lists in the Inspector

Scripting API

You can control Text3D Animator from script. The Asset Library package exports the Text3DAnimator TypeScript class. Reference it with an @input, then call methods or subscribe to events.

Methods

MethodDescription
show(): voidPlays the full sequence: animation in, idle wave (if enabled), then animation out after the combined in + idle duration ends.
playIn(): voidResets all targets to their off state and plays only the in animation. Does not auto-trigger out.
playOut(): voidPlays only the out animation from the current state.
stop(): voidStops the update loop immediately and cancels any pending auto playOut scheduled by show().

Triggering from Behavior

You can call any of these methods from a Behavior script without writing code.

In Scene Hierarchy, add a new object. Add a Behavior script. Set Response Type to Call Object API. For Function name, type a method name such as show. Test in the Preview panel with Tap, for example.

Behavior setup for Text3D Animator API Call Object API response settings

Events

Text3DAnimator exposes four EventSubscription events you can subscribe to. For the Inspector-only equivalent, see Callbacks.

EventPayloadFires when
animationInStartvoidThe in animation begins (first frame of playIn() or show()).
animationInCompletevoidThe in timeline reaches its full duration.
animationOutStartvoidThe out animation begins (first frame of playOut() or the auto-out from show()).
animationOutCompletevoidThe out timeline reaches its full duration.

Each event supports add(), addOnce(), and remove() for managing listeners.

Example: Play and Listen to Events

import { Text3DAnimator } from 'Text3D Animator.lsc/Text3D Animator Resources/Text3DAnimator';

@component
export class Text3DAnimatorExample extends BaseScriptComponent {
@input
text3dAnimator: Text3DAnimator;

onAwake() {
// Subscribe to animation events
this.text3dAnimator.animationInStart.add(() => {
print('Animation IN started');
});

this.text3dAnimator.animationOutComplete.add(() => {
print('Animation OUT complete');
});

// Play the full show sequence
this.text3dAnimator.show();
}
}
Was this page helpful?
Yes
No