#animation #lottie #rive #graphics #text-image #vector-graphic

bin+lib inlottie

lib/tool in Rust to load/save/parse/render lottie animation files

5 releases

new 0.1.9 Jun 18, 2024
0.1.8 Jun 14, 2024
0.1.7 Jun 11, 2024
0.1.6 Jun 5, 2024
0.1.5 May 29, 2024

#98 in Data formats

Download history 125/week @ 2024-05-26 153/week @ 2024-06-02 245/week @ 2024-06-09 207/week @ 2024-06-16

730 downloads per month

MIT/Apache

230KB
3K SLoC

lib/tool in Rust for Lottie (Bodymovin) Animation

The original Lottie json shema file was slightly modified so that the great typify tool could run and convert it into Rust codebase. After extensive manual simplification and optimization efforts, finally, the parser seems to be very compatible to accept most of the realword sample json files of Lottie Animation without too much compromise.

A simple and straightforward viewer/renderer for Lottie animation was implemented intuitively based on femtovg, yet with many features (Text/Image/Audio/LayerEffect/etc.) to be developed/extended.

Besides, a player/renderer adapted to rive-app for Rive animation based on femtovg is also included, though is currently not capable to support clip path and blend mode.

TODO: refer to intvg, development/implement a renderer based on gpac/evg, blend2d, HTML5/Web Canvas API to support most of Lottie and Rive animation features; and a viewer based on bevy engine or Dioxus? Then, enhance capability to parse/handle dotLottie.

Usages

    cargo r -- <path-to-lottie/svg>

    cargo r -F rive  -- <path-to-rive/lottie/svg>

    cargo r -F vello --bin vello -- <path-to-svg>

    cargo r -F b2d --bin blend2d -- <path-to-svg>

(with Drag & Drop support)

Note: To build for rive support, first remove comment of line "rive-rs = " in Cargo.toml. Since it isn't published on crates.io yet.

References

Dependencies

~12–53MB
~838K SLoC