class

Lottie::Animation

Inherits Reference < Object

Constructors

new(comp : Lottie::Comp)
Source

Class methods

load(path : String) : Animation | Nil
Source
parse(json : String) : Animation | Nil

Parse (or return nil for a rejected source: no viewport or fps).

Source

Instance methods

comp
Source
duration(*args, **options)
Source
duration(*args, **options, &)
Source
evaluate(frame : Int32) : Array(DrawPath)

Frame-time evaluation (flat painted paths — the render_tree encoding; spec/dataset replay compares this output).

Source
fps(*args, **options)
Source
fps(*args, **options, &)
Source
frame_count(*args, **options)
Source
frame_count(*args, **options, &)
Source
height(*args, **options)
Source
height(*args, **options, &)
Source
render(frame : Int32, buf : Bytes, w : Int32, h : Int32) : Bool

Rasterize frame into buf (wh4 straight-alpha RGBA8, aspect-preserved, letterboxed — the rlottie shim contract).

Source
width(*args, **options)
Source
width(*args, **options, &)
Source