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

#5 in #lottie

Download history 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 31/week @ 2025-01-08 15/week @ 2025-01-15 10/week @ 2025-01-22 14/week @ 2025-01-29 23/week @ 2025-02-05 19/week @ 2025-02-12 24/week @ 2025-02-19 29/week @ 2025-02-26

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

MIT license

18KB
337 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.3–3MB
~56K SLoC