VelloAnimation

A parsed Lottie composition. Immutable after creation; holds the animation data model (layers, shapes, keyframes) ready for frame-level rendering.

Module: elide.VelloAnimation Support: Experimental

Interface VelloComposition

A parsed Lottie composition. Immutable after creation; holds the animation data model (layers, shapes, keyframes) ready for frame-level rendering.

11 members: 11 undocumented

Static Methods

⚪ fromJSON(json)
Parse a Lottie JSON string into a composition.
⚪ fromBuffer(buffer)
Parse a Lottie file from a raw byte buffer (UTF-8 JSON).

Methods

⚪ getLayer(index)
Return metadata for a layer by index.

Properties

⚪ width
→ u32
⚪ height
Composition width in pixels.
⚪ startFrame
First frame number (typically 0).
⚪ endFrame
Last frame number (exclusive).
⚪ frameCount
Total number of frames (endFrame - startFrame).
⚪ frameRate
Frames per second as declared in the Lottie file.
⚪ duration
Duration in seconds (frameCount / frameRate).
⚪ layerCount
Number of top-level layers.

---

Interface VelloLayerInfo

Return metadata for a layer by index. Returns null if the index is out of range.

5 members: 5 undocumented

Properties

⚪ name
Read-only metadata about a single layer in a composition.
⚪ type
Layer name as declared in the Lottie file.
⚪ startFrame
First frame number (typically 0).
⚪ endFrame
Last frame number (exclusive).
⚪ isMask
Whether this layer is used as a matte/mask for another layer.

---

Enum VelloLayerType

Layer type.
ValueDescription
shape
solid
precomposition
null
image
unknown

Interface VelloAnimationRenderer

Stateful renderer that evaluates a composition at a given frame and emits drawing commands. Maintains internal scratch buffers for performance; reuse across frames.

4 members: 4 undocumented

Constructors

⚪ constructor()
Stateful renderer that evaluates a composition at a given frame and emits

Methods

⚪ renderFrame(composition, scene, frame, transform, alpha)
Render a single frame of the composition into the given scene.
⚪ renderAtTime(composition, scene, timeSeconds, transform, alpha)
Convenience: render at a time offset in seconds rather than a frame number.
⚪ renderFrameToScene(composition, frame, transform, alpha)
Render to a new VelloScene (allocates internally). Useful for one-shot

---

Interface VelloAnimationPlayer

High-level animation player that manages playback state, looping, and frame callbacks. Wraps a VelloComposition and a VelloAnimationRenderer.

Playback advances via explicit tick() calls (typically from requestAnimationFrame) rather than internal timers, giving the caller full control.

19 members: 19 undocumented

Constructors

⚪ constructor(composition, options)
Stateful renderer that evaluates a composition at a given frame and emits

Methods

⚪ play()
Start playback from the current position.
⚪ pause()
Pause playback (currentFrame is preserved).
⚪ stop()
Stop playback and reset to the first frame.
⚪ seekToFrame(frame)
Seek to a specific frame. Clamps to the composition range.
⚪ seekToTime(timeSeconds)
Seek to a specific time in seconds.
⚪ tick(deltaSeconds, scene, transform, alpha)
Advance playback by the given delta time (in seconds) and render the
⚪ onFrame(callback)
Register a callback invoked on every frame change during tick().
⚪ onLoop(callback)
Register a callback invoked when a loop iteration completes.
⚪ onComplete(callback)
Register a callback invoked when playback reaches the end and is not
⚪ removeAllListeners()
Remove all registered callbacks.
⚪ destroy()
Release internal resources. The player is unusable after this.

Properties

⚪ composition
Render a single frame of the composition into the given scene.
⚪ state
The underlying composition.
⚪ currentFrame
Current frame number.
⚪ currentTime
Current playback time in seconds.
⚪ speed
Current playback time in seconds.
⚪ loop
Whether the animation loops.
⚪ loopCount
Number of completed loops (resets on seek).

---

Callback VelloFrameCallback

Register a callback invoked on every frame change during tick(). The callback receives the current frame number.

---

Callback VelloLoopCallback

Register a callback invoked when a loop iteration completes. The callback receives the loop count.

---

Callback VelloCompleteCallback

Register a callback invoked when playback reaches the end and is not looping (or has exhausted the loop count).

---

Dictionary VelloPlayerOptions

High-level animation player that manages playback state, looping, and frame callbacks. Wraps a VelloComposition and a VelloAnimationRenderer.

Playback advances via explicit tick() calls (typically from requestAnimationFrame) rather than internal timers, giving the caller full control.

6 members: 6 undocumented

Properties

⚪ speed
Current playback time in seconds.
⚪ loop
Whether the animation loops.
⚪ maxLoops
Maximum number of loops when loop is "loop" or "ping-pong".
⚪ startFrame
First frame number (typically 0).
⚪ endFrame
Last frame number (exclusive).
⚪ autoplay
Whether to auto-play on construction. Default false.

---

Enum VelloPlaybackState

Current playback state.
ValueDescription
idle
playing
paused
stopped

Enum VelloLoopMode

Whether the animation loops.
ValueDescription
none
loop
ping-pong