It is not currently feature complete, but is capable of rendering a large number of Lottie animations.
To run an example, use:
cargo run -p with_winit -- <PATH_TO_ANIMATION.json>
Note that at the moment, we do not provide any example animations.
The current example does not support running on WASM or Android, however Velato should do so.
let lottie_data = std::fs::read("path/to/lottie.json").unwrap();
let composition = velato::Composition::from_bytes(&lottie_data).unwrap();
let mut renderer = velato::Renderer::new();
let scene = vello::Scene::new();
let mut builder = vello::SceneBuilder::for_scene(&mut scene);
let time_secs = 1.0;
let transform = kurbo::Affine::IDENTITY;
let alpha = 1.0;
renderer.render(&composition, time_secs, transform, alpha, &mut builder);
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions are welcome by pull request. The Rust code of conduct applies.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.