Get the Picture object that contains the animation content The Picture is owned by the Animation and should not be manually disposed
Gets the WASM pointer for this object Returns 0 if object has been disposed (error handled by global handler)
Check if this object has been disposed
Protected_Cleanup function to be implemented by subclasses
The WASM pointer to clean up
Get animation information (frames, duration, fps)
Stop the animation and reset to frame 0
Check if animation is currently playing
Set whether animation should loop
Get loop status
Seek to a specific time (in seconds)
Get current time (in seconds)
Load Lottie animation from raw data
Lottie JSON data as Uint8Array or string
Get or set the current frame
Get or set the current frame
Play the animation
OptionalonFrame: (frame: number) => void
Optional callback called on each frame update
Pause the animation
Set the playback segment by marker name.
Markers are designated at the design level, so the caller must know the marker name in advance. Setting a marker discards any previously set segment.
The marker name, or null to reset to the full timeline
Set the playback segment (for partial playback)
Segment begin frame
Segment end frame
Get the number of markers in the loaded animation
The marker count, or 0 if the animation has no markers
Get the name and frame range of a marker by index
Zero-based marker index
The marker, or null if the index is out of range
Generate a slot from Lottie slot data, for overriding animation properties
The slot data. Pass an object and it is serialized for you, or a raw JSON string to hand through untouched - useful when the data already arrives as text.
A non-zero slot ID on success
Apply a previously generated slot to the animation
The slot ID from gen, or 0 to reset all applied slots
Set the quality level for Lottie effects such as blur and shadows
Quality level from 0 (fastest) to 100 (best), default 50. Values outside the range are clamped.
Beta
Retrieves the master playback volume of the Lottie animation.
The current master playback volume, otherwise 0 if the animation is not loaded.
Beta
Sets the master playback volume of the Lottie animation.
The specified volume is applied to all media assets in the animation. Each media asset preserves its own volume, and the effective playback volume is calculated by multiplying the master volume by the media asset's volume.
A value of 1.0 preserves the original volume. A value of 0.0 mutes all media. Values greater than 1.0 amplify the playback volume.
The recommended range is [0.0, 2.0].
Master playback volume.
Beta
Sets the audio resolver callback for the Lottie audio layers.
The built-in backend stops while a resolver is set, so the resolver takes on every audio layer of the animation.
The resolver, or null to hand the layers back to the
built-in backend.
Manually dispose of this animation and free its WASM memory
Animation controller with the Lottie extensions: markers, slots, etc.
Extends Animation, so loading and playback work identically.
Example
Example