forked from linebender/velato
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for release --------- Co-authored-by: Daniel McNab <[email protected]> Co-authored-by: Kaur Kuut <[email protected]>
- Loading branch information
1 parent
da8abdf
commit 5e1f5e5
Showing
8 changed files
with
155 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Changelog | ||
|
||
<!-- Instructions | ||
This changelog follows the patterns described here: <https://keepachangelog.com/en/1.0.0/>. | ||
Subheadings to categorize changes are `added, changed, deprecated, removed, fixed, security`. | ||
--> | ||
|
||
## Unreleased | ||
|
||
## 0.1.0 (2024-03-26) | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,5 @@ | |
mod builders; | ||
mod converters; | ||
mod defaults; | ||
mod util; | ||
|
||
pub use converters::conv_animation; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,53 @@ | ||
// Copyright 2024 the Velato Authors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
//! Render a Lottie animation to a Vello [`Scene`](crate::vello::Scene). | ||
//! | ||
//! However, this is also intended to be the preferred integration between Vello and [Lottie](https://lottie.github.io/lottie-spec/), so [consider | ||
//! contributing](https://github.com/linebender/velato) if you need a feature which is missing. | ||
//! | ||
//! This crate also re-exports [`vello`], to make handling dependency versions easier. | ||
//! | ||
//! ## Usage | ||
//! | ||
//! ```no_run | ||
//! # use std::str::FromStr; | ||
//! use velato::vello; | ||
//! | ||
//! // Parse your lottie file | ||
//! let lottie = include_str!("../examples/assets/google_fonts/Tiger.json"); | ||
//! let composition = velato::Composition::from_str(lottie).expect("valid file"); | ||
//! | ||
//! // Render to a scene | ||
//! let mut new_scene = vello::Scene::new(); | ||
//! | ||
//! // Render to a scene! | ||
//! let mut renderer = velato::Renderer::new(); | ||
//! let frame = 0.0; // Arbitrary number chosen. Ensure it's a valid frame! | ||
//! let transform = vello::kurbo::Affine::IDENTITY; | ||
//! let alpha = 1.0; | ||
//! renderer.render(&composition, frame, transform, alpha, &mut new_scene); | ||
//! ``` | ||
//! | ||
//! # Unsupported features | ||
//! | ||
//! Missing features include: | ||
//! - Non-linear easings | ||
//! - Position keyframe (`ti`, `to`) easing | ||
//! - Time remapping (`tm`) | ||
//! - Text | ||
//! - Image embedding | ||
//! - Advanced shapes (stroke dash, zig-zag, etc.) | ||
//! - Advanced effects (motion blur, drop shadows, etc.) | ||
//! - Correct color stop handling | ||
//! - Split rotations | ||
//! - Split positions | ||
pub(crate) mod import; | ||
pub(crate) mod runtime; | ||
pub(crate) mod schema; | ||
|
||
pub use runtime::{Composition, Renderer}; | ||
// Re-export vello | ||
pub use vello; | ||
|
||
pub use runtime::{model, Composition, Renderer}; |