10 unstable releases (4 breaking)
0.5.2 | Nov 4, 2022 |
---|---|
0.5.0 | Jul 24, 2022 |
0.3.0 | Mar 17, 2022 |
0.2.0 | Nov 11, 2021 |
#4 in #lottie
75 downloads per month
Used in 6 crates
(3 directly)
17KB
336 lines
rlottie
Safe bindings to rlottie.
lib.rs
:
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:?}");
}
}
Dependencies
~0.4–3MB
~56K SLoC