diff --git a/.clippy.toml b/.clippy.toml index 301d1a4..7c2591c 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -6,5 +6,5 @@ # it makes sense to optimize for 64-bit and accept the performance hits on 32-bit. # 16 bytes is the number of bytes that fits into two 64-bit CPU registers. trivial-copy-size-limit = 16 -msrv = "1.86.0" +msrv = "1.88.0" # END LINEBENDER LINT SET diff --git a/CHANGELOG.md b/CHANGELOG.md index d33b258..1367107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,23 @@ Subheadings to categorize changes are `added, changed, deprecated, removed, fixe ## [Unreleased] -This release has an [MSRV][] of 1.86. +This release has an [MSRV][] of 1.88. + +## [0.9.0] + +This release has an [MSRV][] of 1.88. + +### Changed + +- The `RenderSink` trait has been reintroduced, making it possible to use `velato` with any rendering backend. The `vello` dependency is now optional. ([#95][] by [@nicoburns][]) +- Vello has been upgraded to v0.7 ([#96][] by [@nicoburns][]) + +### Removed + +- The `thiserror` dependency has been removed ([#94][] by [@nicoburns][]) +- The `once_cell` dependency has been removed ([#93][] by [@nicoburns][]) + +### Changed ## [0.8.1] @@ -137,6 +153,7 @@ This release has an [MSRV][] of 1.75. [@atoktoto]: https://github.com/atoktoto [@RishiChalla]: https://github.com/RishiChalla [@RobertBrewitz]: https://github.com/RobertBrewitz +[@nicoburns]: https://github.com/nicoburns [#16]: https://github.com/linebender/velato/pull/16 [#17]: https://github.com/linebender/velato/pull/17 @@ -153,8 +170,13 @@ This release has an [MSRV][] of 1.75. [#83]: https://github.com/linebender/velato/pull/83 [#84]: https://github.com/linebender/velato/pull/82 [#85]: https://github.com/linebender/velato/pull/85 +[#93]: https://github.com/linebender/velato/pull/93 +[#94]: https://github.com/linebender/velato/pull/94 +[#95]: https://github.com/linebender/velato/pull/95 +[#96]: https://github.com/linebender/velato/pull/96 -[Unreleased]: https://github.com/linebender/velato/compare/v0.8.1...HEAD +[Unreleased]: https://github.com/linebender/velato/compare/v0.9.0...HEAD +[0.9.0]: https://github.com/linebender/velato/compare/v0.8.1...v0.9.0 [0.8.1]: https://github.com/linebender/velato/compare/v0.8.0...v0.8.1 [0.8.0]: https://github.com/linebender/velato/compare/v0.7.0...v0.8.0 [0.7.0]: https://github.com/linebender/velato/compare/v0.6.0...v0.7.0 diff --git a/Cargo.lock b/Cargo.lock index dc0bdd2..45425f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2821,7 +2821,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "velato" -version = "0.8.1" +version = "0.9.0" dependencies = [ "kurbo", "peniko", diff --git a/Cargo.toml b/Cargo.toml index f461e79..1ff3b3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["examples/with_winit", "examples/run_wasm", "examples/scenes"] [workspace.package] edition = "2024" -version = "0.8.1" +version = "0.9.0" license = "Apache-2.0 OR MIT" repository = "https://github.com/linebender/velato" # Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml, with the relevant README.md files diff --git a/README.md b/README.md index e9d9206..e321c58 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ # Velato -**An integration to parse and render [Lottie](https://lottie.github.io/) with [Vello](https://vello.dev).** +**A library to parse and render [Lottie](https://lottie.github.io/) animations.** + +Render with the (optional) built-in [Vello](https://vello.dev) integration, or implement the [`RenderSink`](https://docs.rs/velato/latest/velato/trait.RenderSink.html) trait to bring your own renderer. [![Linebender Zulip](https://img.shields.io/badge/Linebender-%23vello-blue?logo=Zulip)](https://xi.zulipchat.com/#narrow/stream/197075-vello) [![dependency status](https://deps.rs/repo/github/linebender/velato/status.svg)](https://deps.rs/repo/github/linebender/velato) @@ -19,14 +21,15 @@ ## Version compatibility -| velato | vello | -| ------ | ----- | -| 0.7-0.8,main| 0.6 | -| 0.6 | 0.5 | -| 0.5 | 0.4 | -| 0.4 | 0.3 | -| 0.3 | 0.2 | -| 0.1, 0.2 | 0.1 | +| velato | vello | +| ------ | ----- | +| 0.9, main | 0.7 | +| 0.7, 0.8 | 0.6 | +| 0.6 | 0.5 | +| 0.5 | 0.4 | +| 0.4 | 0.3 | +| 0.3 | 0.2 | +| 0.1, 0.2 | 0.1 | ## Missing features diff --git a/src/import/builders.rs b/src/import/builders.rs index e2d7624..5dc2f7c 100644 --- a/src/import/builders.rs +++ b/src/import/builders.rs @@ -74,21 +74,21 @@ pub fn setup_precomp_layer( .as_ref() .unwrap_or(&Vec::default()) { - if let Some(shape) = &mask_source.shape { - if let Some(geometry) = conv_shape_geometry(shape) { - let mode = peniko::BlendMode::default(); - let opacity = conv_scalar( - mask_source - .opacity - .as_ref() - .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), - ); - target.masks.push(runtime::model::Mask { - mode, - geometry, - opacity, - }); - } + if let Some(shape) = &mask_source.shape + && let Some(geometry) = conv_shape_geometry(shape) + { + let mode = peniko::BlendMode::default(); + let opacity = conv_scalar( + mask_source + .opacity + .as_ref() + .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), + ); + target.masks.push(runtime::model::Mask { + mode, + geometry, + opacity, + }); } } @@ -157,21 +157,21 @@ pub fn setup_shape_layer( .as_ref() .unwrap_or(&Vec::default()) { - if let Some(shape) = &mask_source.shape { - if let Some(geometry) = conv_shape_geometry(shape) { - let mode = peniko::BlendMode::default(); - let opacity = conv_scalar( - mask_source - .opacity - .as_ref() - .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), - ); - target.masks.push(runtime::model::Mask { - mode, - geometry, - opacity, - }); - } + if let Some(shape) = &mask_source.shape + && let Some(geometry) = conv_shape_geometry(shape) + { + let mode = peniko::BlendMode::default(); + let opacity = conv_scalar( + mask_source + .opacity + .as_ref() + .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), + ); + target.masks.push(runtime::model::Mask { + mode, + geometry, + opacity, + }); } } @@ -221,21 +221,21 @@ pub fn setup_layer_base( target.start_frame = source.layer.start_time.unwrap_or(0.0); for mask_source in source.masks_properties.as_ref().unwrap_or(&Vec::default()) { - if let Some(shape) = &mask_source.shape { - if let Some(geometry) = conv_shape_geometry(shape) { - let mode = peniko::BlendMode::default(); - let opacity = conv_scalar( - mask_source - .opacity - .as_ref() - .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), - ); - target.masks.push(runtime::model::Mask { - mode, - geometry, - opacity, - }); - } + if let Some(shape) = &mask_source.shape + && let Some(geometry) = conv_shape_geometry(shape) + { + let mode = peniko::BlendMode::default(); + let opacity = conv_scalar( + mask_source + .opacity + .as_ref() + .unwrap_or(&FLOAT_VALUE_ONE_HUNDRED), + ); + target.masks.push(runtime::model::Mask { + mode, + geometry, + opacity, + }); } } diff --git a/src/schema/animated_properties/shape_property.rs b/src/schema/animated_properties/shape_property.rs index 1c5864d..78db1fb 100644 --- a/src/schema/animated_properties/shape_property.rs +++ b/src/schema/animated_properties/shape_property.rs @@ -60,10 +60,10 @@ where } // Early return if last keyframe has a start value. - if let Some(last_keyframe) = keyframes.last() { - if last_keyframe.start.is_some() { - return Ok(keyframes); - } + if let Some(last_keyframe) = keyframes.last() + && last_keyframe.start.is_some() + { + return Ok(keyframes); } // The last keyframe has no start value - so there must be at least one other keyframe present.