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

Download history 43/week @ 2024-09-18 64/week @ 2024-09-25 25/week @ 2024-10-02 13/week @ 2024-10-09 13/week @ 2024-10-16 14/week @ 2024-10-23 12/week @ 2024-10-30 5/week @ 2024-11-06 10/week @ 2024-11-13 15/week @ 2024-11-20 25/week @ 2024-11-27 42/week @ 2024-12-04 53/week @ 2024-12-11 17/week @ 2024-12-18 14/week @ 2025-01-01

91 downloads per month
Used in 6 crates (3 directly)

MIT license

17KB
336 lines

rlottie rlottie on crates.io rlottie docs License: MIT

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