Skip to main content
Use this API to create an animation instance that can be used to define and export animations.

Parameters

Return Value

Returns an Animation object with chainable methods.

Animation Instance Methods

Each method returns the animation instance, so calls can be chained. Call export() to export the animation data and pass it to the component’s animation attribute; calling export() clears the previous animation operations.
On basic library versions earlier than 1.11.0, initializing the view animation attribute as {} may cause errors. Initialize it as null.

Style

Rotation

Scale

Translate

Skew

Matrix Transformation

Animation Queue

After describing a group of animations, call step() to close the group. All animations in a group start at the same time, and the next group starts only after the current group ends. step() accepts the same configuration object as my.createAnimation() to configure the current group.

Code Example

my.createLottieContext

Create Lottie animation