xStrom / velato

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Velato

An experimental Lottie animation renderer built for Vello

Xi Zulip dependency status MIT/Apache 2.0 wgpu version vello version

It is not currently feature complete, but is capable of rendering a large number of Lottie animations.

Examples

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.

Platforms

The current example does not support running on WASM or Android, however Velato should do so.

Example usage

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);

License

Licensed under either of

at your option.

Contribution

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.

About

License:Apache License 2.0


Languages

Language:Rust 100.0%