Expand description
Safe Rust bindings to rlottie.
Example
ⓘ
use rlottie::{Animation, Surface};
let mut animation = Animation::from_file(path_to_lottie_json)?;
let size = animation.size();
let mut surface = Surface::new(size);
for frame in 0 .. animation.totalframe() {
animation.render(frame, &mut surface);
for (x, y, color) in surface.pixels() {
println!("frame {frame} at ({x}, {y}): {color:?}");
}
}