From 17e7a1f1cf598edc408a64af73dfc2c3e54336ae Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 4 Feb 2026 21:21:32 +0700 Subject: [PATCH 01/68] Update flake --- flake.lock | 46 ++++-------------------- flake.nix | 101 +++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 76 insertions(+), 71 deletions(-) diff --git a/flake.lock b/flake.lock index 991e7a5..a508c48 100644 --- a/flake.lock +++ b/flake.lock @@ -1,30 +1,12 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1769170682, + "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "c5296fdd05cfa2c187990dd909864da9658df755", "type": "github" }, "original": { @@ -36,7 +18,6 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" } @@ -48,11 +29,11 @@ ] }, "locked": { - "lastModified": 1742870002, - "narHash": "sha256-eQnw8ufyLmrboODU8RKVNh2Mv7SACzdoFrRUV5zdNNE=", + "lastModified": 1769309768, + "narHash": "sha256-AbOIlNO+JoqRJkK1VrnDXhxuX6CrdtIu2hSuy4pxi3g=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b4c18f262dbebecb855136c1ed8047b99a9c75b6", + "rev": "140c9dc582cb73ada2d63a2180524fcaa744fad5", "type": "github" }, "original": { @@ -60,21 +41,6 @@ "repo": "rust-overlay", "type": "github" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ec3d6f2..f1b8f65 100644 --- a/flake.nix +++ b/flake.nix @@ -1,39 +1,78 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - rust-overlay= { + rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-utils = { - url = "github:numtide/flake-utils"; - }; }; - outputs = { nixpkgs, flake-utils, ... } @ inputs: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - overlays = [ (import inputs.rust-overlay) ]; - inherit system; - }; - buildInputs = with pkgs; [ - openssl - udev alsa-lib-with-plugins vulkan-loader - xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr - libxkbcommon wayland - (rust-bin.stable."1.85.1".default.override { - extensions = ["rust-analyzer" "rust-src"]; - }) - ]; - nativeBuildInputs = with pkgs; [ - pkg-config - ]; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; - in - { - devShells.default = pkgs.mkShell { - inherit buildInputs nativeBuildInputs LD_LIBRARY_PATH; - }; - } - ); + outputs = + inputs: + let + forAllSystems = + function: + inputs.nixpkgs.lib.genAttrs + [ + "x86_64-linux" + ] + ( + system: + function ( + import inputs.nixpkgs { + inherit system; + overlays = [ + (import inputs.rust-overlay) + ]; + } + ) + ); + in + { + devShells = forAllSystems ( + pkgs: + let + buildInputs = with pkgs; [ + openssl + udev + alsa-lib-with-plugins + vulkan-loader + xorg.libX11 + xorg.libXcursor + xorg.libXi + xorg.libXrandr + libxkbcommon + wayland + ]; + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; + stableRust = pkgs.rust-bin.stable.latest.default.override { + extensions = [ + "rust-analyzer" + "rust-src" + ]; + }; + nightlyRust = pkgs.rust-bin.selectLatestNightlyWith ( + toolchain: + toolchain.default.override { + extensions = [ + "rust-analyzer" + "rust-src" + ]; + } + ); + in + { + default = pkgs.mkShell { + inherit nativeBuildInputs LD_LIBRARY_PATH; + buildInputs = buildInputs ++ [ stableRust ]; + }; + docrs = pkgs.mkShell { + inherit nativeBuildInputs LD_LIBRARY_PATH; + buildInputs = buildInputs ++ [ nightlyRust ]; + }; + } + ); + }; } From 03ef1b9892b05f8b3b0fc3c76a9e9c40db579ab5 Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 4 Feb 2026 21:23:12 +0700 Subject: [PATCH 02/68] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b4207..d3db30c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased - XXXX-XX-XX +- Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) + - Use latest instead of a version for stableRust in flake.nix + - `nix flake update` + - Remove flake-utils dependency from flake.nix + ## v0.9.1 - 2025-07-15 - Fix color delta interpolation From 82abeabbc4a4e5fbecc8562bca50d56d81622487 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:04:17 +0200 Subject: [PATCH 03/68] update tween events to accept time context and schedule now tweens can be registered to fire on specific schedules per time context (common use: only fire fixed-ticked tweens on fixed update) --- src/tween.rs | 16 +++++++------- src/tween_event.rs | 52 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 13 deletions(-) diff --git a/src/tween.rs b/src/tween.rs index 5f812d1..561b155 100644 --- a/src/tween.rs +++ b/src/tween.rs @@ -214,7 +214,8 @@ use bevy::prelude::*; use crate::combinator::TargetState; -use crate::interpolate::{Interpolator, PreviousValue, CurrentValue}; +use crate::interpolate::{CurrentValue, Interpolator, PreviousValue}; +use bevy_time_runner::{TimeContext, TimeSpanProgress}; mod systems; #[cfg(feature = "bevy_asset")] @@ -236,7 +237,7 @@ pub use systems::{ pub struct SkipTween; /// Automatically managed by an [`Interpolation`] such as [`EaseKind`] and -/// [`EaseClosure`] when a tween has the component [`TimeSpanProgress`](bevy_time_runner::TimeSpanProgress). +/// [`EaseClosure`] when a tween has the component [`TimeSpanProgress`]. /// See [`sample_interpolations_system`] /// /// [`sample_interpolations_system`]: crate::interpolation::sample_interpolations_system @@ -261,9 +262,7 @@ pub struct Tween { } /// Tracks the tween's previous value -#[derive( - Debug, Default, Component, Clone, Copy, Reflect, -)] +#[derive(Debug, Default, Component, Clone, Copy, Reflect)] #[reflect(Component)] pub struct TweenPreviousValue(pub f32); @@ -791,20 +790,21 @@ pub type DefaultTweenEventsPlugin = #[doc(hidden)] #[allow(deprecated)] #[allow(clippy::type_complexity)] -pub fn tween_event_system( +pub fn tween_event_system( commands: Commands, q_tween_event_data: Query< ( Entity, &TweenEventData, - &bevy_time_runner::TimeSpanProgress, + &TimeSpanProgress, Option<&TweenInterpolationValue>, ), - Without, + (Without, With>), >, event_writer: MessageWriter>, ) where Data: Clone + Send + Sync + 'static, + TimeCtx: Default + Send + Sync + 'static, { crate::tween_event::tween_event_system( commands, diff --git a/src/tween_event.rs b/src/tween_event.rs index f6fe514..44d3b5b 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -25,13 +25,17 @@ //! See [`DefaultTweenEventPlugins`] for default events which is also added in //! [`DefaultTweenPlugins`](crate::DefaultTweenPlugins) +use bevy_time_runner::TimeContext; use std::marker::PhantomData; use bevy::{app::PluginGroupBuilder, prelude::*}; use bevy_time_runner::TimeSpanProgress; -use crate::tween::{SkipTween, TweenInterpolationValue}; +use crate::{ + InternedScheduleLabel, + tween::{SkipTween, TweenInterpolationValue}, +}; /// Plugin for simple generic event that fires at a specific time span. #[derive(Default)] @@ -51,9 +55,46 @@ where .world() .get_resource::() .expect("`TweenAppResource` resource doesn't exist"); + app.add_plugins(TweenEventOnSchedulePlugin::::for_schedule( + app_resource.default_schedule, + )); + } +} + +/// A plugin for registering the tween event system for tween of type Data for the specified schedule +pub struct TweenEventOnSchedulePlugin +where + Data: Send + Sync + 'static + Clone, + TimeCtx: Default + Send + Sync + 'static, +{ + /// The systems schedule + pub schedule: InternedScheduleLabel, + data_marker: PhantomData, + time_step_marker: PhantomData, +} +impl TweenEventOnSchedulePlugin +where + Data: Send + Sync + 'static + Clone, + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for schedule + pub fn for_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + data_marker: PhantomData::default(), + time_step_marker: PhantomData::default(), + } + } +} +impl Plugin for TweenEventOnSchedulePlugin +where + Data: Send + Sync + 'static + Clone, + TimeCtx: Default + Send + Sync + 'static, +{ + fn build(&self, app: &mut App) { app.add_systems( - app_resource.schedule, - (tween_event_system::) + self.schedule.clone(), + (tween_event_system::) .in_set(crate::TweenSystemSet::ApplyTween), ) .add_message::>(); @@ -120,7 +161,7 @@ pub struct TweenEvent { /// and [`TweenEventData`] exist in the same entity and data is `Some`, /// cloning the data. #[allow(clippy::type_complexity)] -pub fn tween_event_system( +pub fn tween_event_system( mut commands: Commands, q_tween_event_data: Query< ( @@ -129,11 +170,12 @@ pub fn tween_event_system( &TimeSpanProgress, Option<&TweenInterpolationValue>, ), - Without, + (Without, With>), >, mut event_writer: MessageWriter>, ) where Data: Clone + Send + Sync + 'static, + TimeCtx: Default + Send + Sync + 'static, { q_tween_event_data.iter().for_each( |(entity, event_data, progress, interpolation_value)| { From 37fa3cf54a2d8c651b5454cf98d5a1b15a3a4645 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:04:42 +0200 Subject: [PATCH 04/68] update lookup curve logic to accept time context and schedule so that curves would only be sampled when relevant, and always sampled when relevant --- src/interpolation/bevy_lookup_curve.rs | 56 +++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 0203f96..c6f6053 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -10,6 +10,7 @@ //! - [`sample_lookup_curve_system`] use super::*; +use crate::InternedScheduleLabel; use ::bevy_lookup_curve::{LookupCache, LookupCurve}; use bevy::platform::collections::HashSet; use tracing::error; @@ -18,15 +19,55 @@ use tracing::error; pub struct BevyLookupCurveInterpolationPlugin; impl Plugin for BevyLookupCurveInterpolationPlugin { + /// # Panics + /// + /// Panics if [`TweenAppResource`] does not exist in world. + /// + /// [`TweenAppResource`]: crate::TweenAppResource fn build(&self, app: &mut App) { let app_resource = app .world() .get_resource::() .expect("`TweenAppResource` to be inserted to world"); + app.add_plugins( + BevyLookupCurveInterpolationForSchedulePlugin::<()>::on_schedule( + app_resource.default_schedule, + ), + ); + } +} + +/// Use [`bevy_lookup_curve`](::bevy_lookup_curve) for interpolation on the specified schedule +pub struct BevyLookupCurveInterpolationForSchedulePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// The systems' schedules + pub schedule: InternedScheduleLabel, + /// time step marker + time_step_marker: PhantomData, +} +impl BevyLookupCurveInterpolationForSchedulePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for that schedule + pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + time_step_marker: PhantomData::default(), + } + } +} +impl Plugin for BevyLookupCurveInterpolationForSchedulePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + fn build(&self, app: &mut App) { app.add_systems( - app_resource.schedule, + self.schedule.clone(), ( - sample_lookup_curve_system + sample_lookup_curve_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), // sample_interpolations_mut_system:: // .in_set(TweenSystemSet::UpdateInterpolationValue), @@ -46,7 +87,7 @@ pub struct LookupCurveHandle(pub Handle); /// Interpolation system for [`LookupCurveHandle`] #[allow(clippy::type_complexity)] -pub fn sample_lookup_curve_system( +pub fn sample_lookup_curve_system( mut commands: Commands, mut query: Query< ( @@ -55,12 +96,17 @@ pub fn sample_lookup_curve_system( Option<&mut LookupCurveCache>, &TimeSpanProgress, ), - Or<(Changed, Changed)>, + ( + Or<(Changed, Changed)>, + With>, + ), >, mut removed: RemovedComponents, lookup_curve: Res>, mut last_handle_error: Local>>, -) { +) where + TimeCtx: Default + Send + Sync + 'static, +{ let mut handle_error = HashSet::new(); query .iter_mut() From 1f2e898b6fdb6a78f19369979aed5f185997424e Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:05:03 +0200 Subject: [PATCH 05/68] allow registering interpolators by schedule and time context so that, for example, fixed-time animations would only interpolate their tween values on fixed updates. This is crucial for them to work properly (for example, fixed translation tweens should only move their entities on fixed updates) --- src/interpolate.rs | 170 +++++++++++++++++++++++++++++++------------ src/interpolation.rs | 86 ++++++++++++++++++---- 2 files changed, 197 insertions(+), 59 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 84acf1d..e4bf40d 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -84,7 +84,10 @@ pub use sprite::*; #[cfg(feature = "bevy_ui")] pub use ui::*; -use crate::{tween, BevyTweenRegisterSystems}; +use crate::{ + BevyTweenRegisterSystemsToSchedule, InternedScheduleLabel, + TweenAppResource, tween, +}; use bevy::prelude::*; /// Alias for an `Interpolator` as a boxed trait object. @@ -95,7 +98,8 @@ pub type CurrentValue = f32; /// A marker type for the tweens previous value, for ease of closure readability pub type PreviousValue = f32; -type InterpolatorClosure = Box; +type InterpolatorClosure = + Box; /// Create boxed closure in order to be used with dynamic [`Interpolator`] pub fn closure(f: F) -> InterpolatorClosure @@ -120,7 +124,12 @@ pub trait Interpolator: Send + Sync + 'static { /// The value should be already sampled from an [`Interpolation`] /// /// [`Interpolation`]: crate::interpolation::Interpolation - fn interpolate(&self, item: &mut Self::Item, value: CurrentValue, previous_value: PreviousValue); + fn interpolate( + &self, + item: &mut Self::Item, + value: CurrentValue, + previous_value: PreviousValue, + ); } // /// Reflect [`Interpolator`] trait @@ -217,36 +226,79 @@ impl Plugin for DefaultInterpolatorsPlugin { /// /// [`TweenAppResource`]: crate::TweenAppResource fn build(&self, app: &mut App) { - app.add_tween_systems(( - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), - )) - .register_type::>() - .register_type::>() - .register_type::>() - .register_type::>(); + let app_resource = app + .world() + .get_resource::() + .expect("`TweenAppResource` to be is inserted to world"); + app.add_plugins(( + DefaultInterpolatorsTypeRegistrationPlugin, + DefaultInterpolatorsSystemRegistrationPlugin { + schedules: vec![app_resource.default_schedule], + }, + )); + } +} + +/// Register type for the default interpolators for a chosen schedule +pub struct DefaultInterpolatorsTypeRegistrationPlugin; +impl Plugin for DefaultInterpolatorsTypeRegistrationPlugin { + fn build(&self, app: &mut App) { + app.register_type::>() + .register_type::>() + .register_type::>() + .register_type::>(); #[cfg(feature = "bevy_sprite")] - app.add_tween_systems(( - tween::component_tween_system::(), - )) - .register_type::>(); + app.register_type::>(); #[cfg(feature = "bevy_ui")] - app.add_tween_systems(( - tween::component_tween_system::(), - tween::component_tween_system::(), - )) - .register_type::>() + app.register_type::>() .register_type::>(); #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] - app.add_tween_systems(( - tween::asset_tween_system::(), - )) - .register_type::>(); + app.register_type::>(); + } +} + +/// Register systems for the default interpolators for a chosen schedule +pub struct DefaultInterpolatorsSystemRegistrationPlugin { + /// The systems' schedules + pub schedules: Vec, +} +impl Plugin for DefaultInterpolatorsSystemRegistrationPlugin { + fn build(&self, app: &mut App) { + for schedule in self.schedules.clone() { + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::(), + tween::component_tween_system::(), + tween::component_tween_system::(), + tween::component_tween_system::(), + ), + ); + + #[cfg(feature = "bevy_sprite")] + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::(), + ); + + #[cfg(feature = "bevy_ui")] + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::(), + tween::component_tween_system::(), + ), + ); + + #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] + app.add_tween_systems_to_schedule( + schedule, + tween::asset_tween_system::(), + ); + } } } @@ -267,28 +319,54 @@ impl Plugin for DefaultDynInterpolatorsPlugin { /// /// [`TweenAppResource`]: crate::TweenAppResource fn build(&self, app: &mut App) { - app.add_tween_systems(tween::component_tween_system::< - BoxedInterpolator, - >()); + let app_resource = app + .world() + .get_resource::() + .expect("`TweenAppResource` to be is inserted to world"); + app.add_plugins(DefaultDynInterpolatorsSystemRegistrationPlugin { + schedules: vec![app_resource.default_schedule], + }); + } +} +/// Register type and systems for the dynamic default interpolators for a chosen schedule +pub struct DefaultDynInterpolatorsSystemRegistrationPlugin { + /// The systems' schedules + pub schedules: Vec, +} +impl Plugin for DefaultDynInterpolatorsSystemRegistrationPlugin { + fn build(&self, app: &mut App) { + for schedule in self.schedules.clone() { + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::>(), + ); - #[cfg(feature = "bevy_sprite")] - app.add_tween_systems(tween::component_tween_system::< - BoxedInterpolator, - >()); + #[cfg(feature = "bevy_sprite")] + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::>(), + ); - #[cfg(feature = "bevy_ui")] - app.add_tween_systems(( - tween::component_tween_system::< - BoxedInterpolator, - >(), - tween::component_tween_system::< - BoxedInterpolator, - >(), - )); + #[cfg(feature = "bevy_ui")] + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::< + BoxedInterpolator, + >(), + tween::component_tween_system::< + BoxedInterpolator, + >(), + ), + ); - #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset"))] - app.add_tween_systems(tween::asset_tween_system::< - BoxedInterpolator, - >()); + #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset"))] + app.add_tween_systems_to_schedule( + schedule, + tween::asset_tween_system::< + BoxedInterpolator, + >(), + ); + } } } diff --git a/src/interpolation.rs b/src/interpolation.rs index 0aff946..39f0268 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -11,8 +11,12 @@ use bevy::math::curve::EaseFunction; use bevy::prelude::*; +use bevy_time_runner::TimeContext; +use std::marker::PhantomData; -use crate::{tween::TweenInterpolationValue, TweenSystemSet}; +use crate::{ + InternedScheduleLabel, TweenSystemSet, tween::TweenInterpolationValue, +}; use bevy_time_runner::TimeSpanProgress; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -32,7 +36,6 @@ pub trait Interpolation { /// Plugin for [`EaseKind`] pub struct EaseKindPlugin; - impl Plugin for EaseKindPlugin { /// # Panics /// @@ -44,12 +47,55 @@ impl Plugin for EaseKindPlugin { .world() .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); + app.add_plugins(( + EaseKindTypeRegistrationPlugin, + EaseKindSystemRegistrationPlugin::<()>::on_schedule( + app_resource.default_schedule, + ), + )); + } +} + +/// Plugin for [`EaseKind`] type registration +pub struct EaseKindTypeRegistrationPlugin; +impl Plugin for EaseKindTypeRegistrationPlugin { + fn build(&self, app: &mut App) { + app.register_type::(); + } +} + +/// Plugin for [`EaseKind`] system registration +pub struct EaseKindSystemRegistrationPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// The systems' schedules + pub schedule: InternedScheduleLabel, + /// time step marker + time_step_marker: PhantomData, +} +impl EaseKindSystemRegistrationPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for that schedule + pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + time_step_marker: PhantomData::default(), + } + } +} +impl Plugin for EaseKindSystemRegistrationPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + fn build(&self, app: &mut App) { app.add_systems( - app_resource.schedule, - sample_interpolations_system:: + self.schedule.clone(), + sample_interpolations_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), - ) - .register_type::(); + ); } } @@ -407,8 +453,18 @@ impl From for EaseKind { /// not with [`DefaultTweenPlugins`] to reduce unused system. /// /// [`DefaultTweenPlugins`]: crate::DefaultTweenPlugins -pub struct EaseClosurePlugin; -impl Plugin for EaseClosurePlugin { +#[derive(Default)] +pub struct EaseClosurePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// time step marker + time_step_marker: PhantomData, +} +impl Plugin for EaseClosurePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ /// # Panics /// /// Panics if [`TweenAppResource`] does not exist in world. @@ -420,8 +476,8 @@ impl Plugin for EaseClosurePlugin { .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); app.add_systems( - app_resource.schedule, - sample_interpolations_system:: + app_resource.default_schedule, + sample_interpolations_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), ); } @@ -456,15 +512,19 @@ impl Interpolation for EaseClosure { /// [`TimeSpanProgress`] component then insert [`TweenInterpolationValue`]. /// Remove [`TweenInterpolationValue`] if [`TimeSpanProgress`] is removed. #[allow(clippy::type_complexity)] -pub fn sample_interpolations_system( +pub fn sample_interpolations_system( mut commands: Commands, query: Query< (Entity, &I, &TimeSpanProgress), - Or<(Changed, Changed)>, + ( + Or<(Changed, Changed)>, + With>, + ), >, mut removed: RemovedComponents, ) where I: Interpolation + Component, + TimeCtx: Default + Send + Sync + 'static, { query.iter().for_each(|(entity, interpolator, progress)| { if progress.now_percentage.is_nan() { @@ -486,7 +546,7 @@ pub fn sample_interpolations_system( mod easing_functions { use core::f32::consts::{FRAC_PI_2, FRAC_PI_3, PI}; - use bevy::math::{ops, FloatPow}; + use bevy::math::{FloatPow, ops}; #[inline] pub(crate) fn linear(t: f32) -> f32 { From a6470678b21fd0b5cd4e375d35c3c05f59dc238a Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:05:26 +0200 Subject: [PATCH 06/68] allow easy animation creation for schedule and time context by adding a generic constructor and having the previous constructor call it defaultly --- src/combinator.rs | 80 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/src/combinator.rs b/src/combinator.rs index 5588820..c996609 100644 --- a/src/combinator.rs +++ b/src/combinator.rs @@ -4,7 +4,8 @@ use std::time::Duration; use bevy::{ecs::system::EntityCommands, prelude::*}; use bevy_time_runner::{ - Repeat, RepeatStyle, SkipTimeRunner, TimeDirection, TimeRunner, TimeSpan, + Repeat, RepeatStyle, SkipTimeRunner, TimeContext, TimeDirection, + TimeRunner, TimeSpan, }; mod animation_combinators; @@ -37,44 +38,101 @@ pub trait AnimationBuilderExt { fn animation(&mut self) -> AnimationBuilder<'_>; } +/// Extension trait for types that can be used to make an animation. +pub trait AnimationBuilderExtGeneric { + /// Construct [`AnimationBuilder`] from [`Self`] + fn animation_for_timestep( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static; +} + +impl AnimationBuilderExtGeneric for EntityCommands<'_> { + /// Construct [`AnimationBuilder`] from [`EntityCommands`]. + /// Use this entity as the animator. + /// Tweens will be spawned as children of this entity. + fn animation_for_timestep( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.reborrow()) + } +} impl AnimationBuilderExt for EntityCommands<'_> { /// Construct [`AnimationBuilder`] from [`EntityCommands`]. /// Use this entity as the animator. /// Tweens will be spawned as children of this entity. fn animation(&mut self) -> AnimationBuilder<'_> { - AnimationBuilder::new(self.reborrow()) + self.animation_for_timestep() } } +impl AnimationBuilderExtGeneric for Commands<'_, '_> { + /// Construct [`AnimationBuilder`] from [`Commands`]. + /// This will automatically spawn an entity as the animator. + fn animation_for_timestep( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.spawn_empty()) + } +} impl AnimationBuilderExt for Commands<'_, '_> { /// Construct [`AnimationBuilder`] from [`Commands`]. /// This will automatically spawn an entity as the animator. fn animation(&mut self) -> AnimationBuilder<'_> { - AnimationBuilder::new(self.spawn_empty()) + self.animation_for_timestep() } } +impl AnimationBuilderExtGeneric for ChildSpawnerCommands<'_> { + /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. + /// This will automatically spawn a child entity as the animator. + fn animation_for_timestep( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.spawn_empty()) + } +} impl AnimationBuilderExt for ChildSpawnerCommands<'_> { /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. /// This will automatically spawn a child entity as the animator. fn animation(&mut self) -> AnimationBuilder<'_> { - AnimationBuilder::new(self.spawn_empty()) + self.animation_for_timestep() } } /// Configure [`TimeRunner`] through a builder API and add animation entities -pub struct AnimationBuilder<'a> { +pub struct AnimationBuilder<'a, TimeCtx = ()> +where + TimeCtx: Default + Send + Sync + 'static, +{ entity_commands: EntityCommands<'a>, time_runner: Option, + time_step_marker: Option>, custom_length: Option, skipped: bool, } -impl<'a> AnimationBuilder<'a> { +impl<'a, TimeCtx> AnimationBuilder<'a, TimeCtx> +where + TimeCtx: Default + Send + Sync + 'static, +{ /// Create new [`AnimationBuilder`] - pub fn new(entity_commands: EntityCommands<'a>) -> AnimationBuilder<'a> { + pub fn new( + entity_commands: EntityCommands<'a>, + ) -> AnimationBuilder<'a, TimeCtx> { AnimationBuilder { entity_commands, time_runner: None, + time_step_marker: None, custom_length: None, skipped: false, } @@ -180,6 +238,7 @@ impl<'a> AnimationBuilder<'a> { let AnimationBuilder { mut entity_commands, time_runner, + time_step_marker, custom_length, skipped, } = self; @@ -197,7 +256,8 @@ impl<'a> AnimationBuilder<'a> { time_runner.set_length(dur); } } - entity_commands.insert(time_runner); + entity_commands + .insert((time_runner, time_step_marker.unwrap_or_default())); if skipped { entity_commands.insert(SkipTimeRunner); } @@ -221,6 +281,7 @@ impl<'a> AnimationBuilder<'a> { let AnimationBuilder { mut entity_commands, time_runner, + time_step_marker, custom_length, skipped, } = self; @@ -239,6 +300,7 @@ impl<'a> AnimationBuilder<'a> { interpolation, tweens, time_runner, + time_step_marker.unwrap_or_default(), )); if skipped { entity_commands.insert(SkipTimeRunner); @@ -268,6 +330,7 @@ impl<'a> AnimationBuilder<'a> { let AnimationBuilder { mut entity_commands, time_runner, + time_step_marker, custom_length, skipped, } = self; @@ -286,6 +349,7 @@ impl<'a> AnimationBuilder<'a> { interpolation, tweens, time_runner, + time_step_marker.unwrap_or_default(), )); if skipped { entity_commands.try_insert(SkipTimeRunner); From 5146299208e824d49ca1f170768603166d54e8a5 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:05:45 +0200 Subject: [PATCH 07/68] update crate api to allow different schedules and time contexts * separate plugins that should be registered ones, ones that should be registered per schedule and ones that should be registered per schedule and time context. * allow registering system sets per schedule (necessary for them to take effect) * allow adding tween systems to a specific schedule (necessary for the rest to work) --- src/lib.rs | 198 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 165 insertions(+), 33 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b9c56ee..42dc346 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -361,6 +361,8 @@ use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; use bevy::ecs::system::ScheduleSystem; use bevy::{app::PluginGroupBuilder, prelude::*}; +use bevy_time_runner::TimeRunnerSystemsPlugin; +use std::marker::PhantomData; mod utils; @@ -382,7 +384,9 @@ pub mod prelude { pub use crate::interpolate::{self, BoxedInterpolator, Interpolator}; pub use crate::interpolation::EaseKind; - pub use crate::bevy_time_runner::{Repeat, RepeatStyle, TimeDirection}; + pub use crate::bevy_time_runner::{ + Repeat, RepeatStyle, TimeContext, TimeDirection, + }; pub use crate::combinator::{AnimationBuilderExt, TransformTargetStateExt}; @@ -418,42 +422,120 @@ pub use tween::resource_tween_system; pub use tween_event::tween_event_system; /// Default plugins for using crate. -/// -/// Plugins: -/// - [`TweenCorePlugin`] -/// - [`interpolate::DefaultInterpolatorsPlugin`] -/// - [`interpolate::DefaultDynInterpolatorsPlugin`] -/// - [`interpolation::EaseKindPlugin`] -/// - [`tween_event::DefaultTweenEventPlugins`] pub struct DefaultTweenPlugins; impl PluginGroup for DefaultTweenPlugins { fn build(self) -> bevy::app::PluginGroupBuilder { - #[allow(clippy::let_and_return)] let group = PluginGroupBuilder::start::() - .add(TweenCorePlugin::default()) - .add(interpolate::DefaultInterpolatorsPlugin) - .add(interpolate::DefaultDynInterpolatorsPlugin) - .add(interpolation::EaseKindPlugin) - .add_group(tween_event::DefaultTweenEventPlugins); - #[cfg(feature = "bevy_lookup_curve")] - let group = group.add(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationPlugin); + .add_group(TweenScheduleIndependentPlugins) + .add_group(TweenSchedulesDependentPlugins { + schedules: vec![PostUpdate.intern()], + }) + .add(TweenScheduleAndStepDependentPlugins::<()>::for_schedule( + PostUpdate.intern(), + )); + group + } +} + +/// Time-step and schedule agnostic logic. These should always be registered once and the same. +pub struct TweenScheduleIndependentPlugins; + +impl PluginGroup for TweenScheduleIndependentPlugins { + fn build(self) -> bevy::app::PluginGroupBuilder { + let group = + PluginGroupBuilder::start::() + .add(TweenCorePlugin::default()) + .add(interpolate::DefaultInterpolatorsTypeRegistrationPlugin) + .add(interpolation::EaseKindTypeRegistrationPlugin) + .add_group(tween_event::DefaultTweenEventPlugins); + group + } +} + +/// Schedule-specific logic that is time-step agnostic. Should be registered once with all the schedules. +pub struct TweenSchedulesDependentPlugins { + /// schedules in which the systems would run + pub schedules: Vec, +} +impl PluginGroup for TweenSchedulesDependentPlugins { + fn build(self) -> bevy::app::PluginGroupBuilder { + let group = + PluginGroupBuilder::start::() + .add( + interpolate::DefaultInterpolatorsSystemRegistrationPlugin { + schedules: self.schedules.clone(), + }, + ) + .add( + interpolate::DefaultDynInterpolatorsSystemRegistrationPlugin { + schedules: self.schedules.clone(), + }, + ) + .add(SystemSetsRegistraitonPlugin { + schedules: self.schedules.clone(), + }); group } } +/// Schedule and time-step specific systems. +/// For example, if I want to add systems for Fixed time-step interpolation, +/// I should specify here the schedule in which they should run (In this case, probably FixedLast). +pub struct TweenScheduleAndStepDependentPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// The schedule in which the time-step based systems would be executed + pub schedule: InternedScheduleLabel, + time_step_marker: PhantomData, +} +impl TweenScheduleAndStepDependentPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for schedule + pub fn for_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + time_step_marker: PhantomData::default(), + } + } +} + +impl Plugin for TweenScheduleAndStepDependentPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + fn build(&self, app: &mut App) { + #[allow(clippy::let_and_return)] + app.add_plugins(interpolation::EaseKindSystemRegistrationPlugin::< + TimeCtx, + >::on_schedule(self.schedule.clone())); + #[cfg(feature = "bevy_lookup_curve")] + app.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::on_schedule(self.schedule.clone())); + if !app.is_plugin_added::>() { + app.add_plugins( + TimeRunnerSystemsPlugin::::from_schedule_intern( + self.schedule.clone(), + ), + ); + } + } +} + /// This resource will be used while initializing tween plugin and systems. /// [`BevyTweenRegisterSystems`] for example. #[derive(Resource, Clone)] pub struct TweenAppResource { /// Configured schedule for tween systems. - pub schedule: InternedScheduleLabel, + pub default_schedule: InternedScheduleLabel, } impl Default for TweenAppResource { fn default() -> Self { TweenAppResource { - schedule: PostUpdate.intern(), + default_schedule: PostUpdate.intern(), } } } @@ -467,31 +549,33 @@ impl Default for TweenAppResource { /// /// [`UpdateInterpolationValue`]: [`TweenSystemSet::UpdateInterpolationValue`] /// [`ApplyTween`]: [`TweenSystemSet::ApplyTween`] -#[derive(Default)] pub struct TweenCorePlugin { /// See [`TweenAppResource`] pub app_resource: TweenAppResource, + /// Whether bevy_time_runner should log debug info + pub enable_time_runner_debug: bool, +} +impl Default for TweenCorePlugin { + fn default() -> Self { + Self { + app_resource: TweenAppResource::default(), + enable_time_runner_debug: true, + } + } } impl Plugin for TweenCorePlugin { fn build(&self, app: &mut App) { if !app.is_plugin_added::() { app.add_plugins(bevy_time_runner::TimeRunnerPlugin { - schedule: self.app_resource.schedule, + schedule: self.app_resource.default_schedule, + enable_debug: self.enable_time_runner_debug, }); } - app.configure_sets( - self.app_resource.schedule, - ( - TweenSystemSet::UpdateInterpolationValue, - TweenSystemSet::ApplyTween, - ) - .chain() - .after(bevy_time_runner::TimeRunnerSet::Progress), - ) - .insert_resource(self.app_resource.clone()) - .register_type::() - .register_type::(); + + app.insert_resource(self.app_resource.clone()) + .register_type::() + .register_type::(); } fn cleanup(&self, app: &mut App) { @@ -499,6 +583,28 @@ impl Plugin for TweenCorePlugin { } } +/// A plugin for registering the system sets in specific schedules +struct SystemSetsRegistraitonPlugin { + /// The schedules to register the sets in + schedules: Vec, +} + +impl Plugin for SystemSetsRegistraitonPlugin { + fn build(&self, app: &mut App) { + for schedule in self.schedules.clone() { + app.configure_sets( + schedule, + ( + TweenSystemSet::UpdateInterpolationValue, + TweenSystemSet::ApplyTween, + ) + .chain() + .after(bevy_time_runner::TimeRunnerSet::Progress), + ); + } + } +} + /// Enum of SystemSet in this crate. /// See [`TweenCorePlugin`] for default system configuration. #[derive(Debug, SystemSet, Clone, Copy, PartialEq, Eq, Hash)] @@ -544,8 +650,34 @@ impl BevyTweenRegisterSystems for App { .world() .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); + self.add_tween_systems_to_schedule( + app_resource.default_schedule, + tween_systems, + ) + } +} + +/// Helper trait to add systems by this crate to your app +/// for different schedules +pub trait BevyTweenRegisterSystemsToSchedule { + /// Register tween systems + fn add_tween_systems_to_schedule( + &mut self, + schedule: InternedScheduleLabel, + tween_systems: impl IntoScheduleConfigs, + ) -> &mut Self; +} + +impl BevyTweenRegisterSystemsToSchedule for App { + /// Register tween systems in schedule + /// in set [`TweenSystemSet::ApplyTween`] + fn add_tween_systems_to_schedule( + &mut self, + schedule: InternedScheduleLabel, + tween_systems: impl IntoScheduleConfigs, + ) -> &mut Self { self.add_systems( - app_resource.schedule, + schedule, tween_systems.in_set(TweenSystemSet::ApplyTween), ) } From 7969090ab7f63120ada75c6eb5d2dce0a7f56321 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:06:12 +0200 Subject: [PATCH 08/68] update previously existing examples to match new time runner crate --- examples/demo/delta_tweens.rs | 50 +++++++++++++++-------------------- examples/demo/hold.rs | 9 +++++-- examples/entity_structure.rs | 38 +++++++++++++++++--------- 3 files changed, 53 insertions(+), 44 deletions(-) diff --git a/examples/demo/delta_tweens.rs b/examples/demo/delta_tweens.rs index 9511080..9571c06 100644 --- a/examples/demo/delta_tweens.rs +++ b/examples/demo/delta_tweens.rs @@ -1,14 +1,9 @@ -use std::time::Duration; -use bevy::{ - prelude::*, -}; use bevy::color::palettes::basic::WHITE; use bevy::color::palettes::css::{BLUE, RED}; -use bevy_tween::{ - combinator::*, prelude::*, - tween::AnimationTarget, -}; -use bevy_tween::interpolate::{sprite_color_delta_to}; +use bevy::prelude::*; +use bevy_tween::interpolate::sprite_color_delta_to; +use bevy_tween::{combinator::*, prelude::*, tween::AnimationTarget}; +use std::time::Duration; fn secs(secs: f32) -> Duration { Duration::from_secs_f32(secs) @@ -17,10 +12,7 @@ fn secs(secs: f32) -> Duration { fn main() { App::new() .add_plugins((DefaultPlugins, DefaultTweenPlugins)) - .add_systems(Startup, ( - setup, - spawn_circle_with_tweens - )) + .add_systems(Startup, (setup, spawn_circle_with_tweens)) .run(); } @@ -41,17 +33,17 @@ fn spawn_circle_with_tweens( let mut circle_transform_state = circle.transform_state(circle_transform); let mut circle_sprite_state = circle.state(WHITE.into()); - let mut circle_commands = commands - .spawn(( - Sprite { - image: circle_filled_image, - ..default() - }, - circle_transform, - AnimationTarget, - )); + let mut circle_commands = commands.spawn(( + Sprite { + image: circle_filled_image, + ..default() + }, + circle_transform, + AnimationTarget, + )); - circle_commands.animation() + circle_commands + .animation() .repeat(Repeat::Infinitely) .repeat_style(RepeatStyle::PingPong) .insert(parallel(( @@ -70,10 +62,10 @@ fn spawn_circle_with_tweens( EaseKind::Linear, circle_sprite_state.with(sprite_color_delta_to(BLUE.into())), ), - tween( - float_duration, - EaseKind::CubicIn, - circle_sprite_state.with(sprite_color_delta_to(RED.into())), - ) + tween( + float_duration, + EaseKind::CubicIn, + circle_sprite_state.with(sprite_color_delta_to(RED.into())), + ), ))); -} \ No newline at end of file +} diff --git a/examples/demo/hold.rs b/examples/demo/hold.rs index d902f4e..a0a7447 100644 --- a/examples/demo/hold.rs +++ b/examples/demo/hold.rs @@ -1,11 +1,11 @@ use std::f32::consts::PI; +use bevy::window::CursorIcon; use bevy::{ color::palettes::css::{DEEP_PINK, WHITE}, prelude::*, window::{PrimaryWindow, SystemCursorIcon}, }; -use bevy::window::CursorIcon; use bevy_tween::{bevy_time_runner::TimeRunner, prelude::*}; use rand::prelude::*; @@ -27,7 +27,12 @@ mod interpolate { impl Interpolator for EffectIntensity { type Item = super::EffectIntensitiy; - fn interpolate(&self, item: &mut Self::Item, value: f32, _previous_value: f32) { + fn interpolate( + &self, + item: &mut Self::Item, + value: f32, + _previous_value: f32, + ) { item.0 = self.start.lerp(self.end, value) } } diff --git a/examples/entity_structure.rs b/examples/entity_structure.rs index 4c3b1e9..f69c442 100644 --- a/examples/entity_structure.rs +++ b/examples/entity_structure.rs @@ -1,5 +1,5 @@ use bevy::prelude::*; -use bevy_tween::interpolate::{translation, AngleZ, Translation}; +use bevy_tween::interpolate::{AngleZ, Translation, translation}; use bevy_tween::prelude::*; use bevy_tween::{ bevy_time_runner::{TimeRunner, TimeSpan}, @@ -48,18 +48,19 @@ fn setup(mut commands: Commands) { sprite(start_x, y), AnimationTarget, TimeRunner::new(Duration::from_secs(5)), + TimeContext::<()>::default(), TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), EaseKind::QuadraticInOut, ComponentTween::new_target( TargetComponent::marker(), - translation(Vec3::new(start_x, y, 0.), Vec3::new(end_x, y, 0.)) + translation(Vec3::new(start_x, y, 0.), Vec3::new(end_x, y, 0.)), ), ComponentTween::new_target( TargetComponent::marker(), AngleZ { start: angle_start, end: angle_end, - delta: false + delta: false, }, ), )); @@ -84,6 +85,7 @@ fn setup(mut commands: Commands) { sprite(start_x, y), AnimationTarget, TimeRunner::new(Duration::from_secs(5)), + TimeContext::<()>::default(), )) .with_children(|c| { c.spawn(( @@ -91,14 +93,17 @@ fn setup(mut commands: Commands) { EaseKind::QuadraticInOut, ComponentTween::new_target( TargetComponent::marker(), - translation(Vec3::new(start_x, y, 0.), Vec3::new(end_x, y, 0.)) + translation( + Vec3::new(start_x, y, 0.), + Vec3::new(end_x, y, 0.), + ), ), ComponentTween::new_target( TargetComponent::marker(), AngleZ { start: angle_start, end: angle_end, - delta: false + delta: false, }, ), )); @@ -124,18 +129,22 @@ fn setup(mut commands: Commands) { .with_children(|c| { c.spawn(( TimeRunner::new(Duration::from_secs(5)), + TimeContext::<()>::default(), TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), EaseKind::QuadraticInOut, ComponentTween::new_target( TargetComponent::marker(), - translation(Vec3::new(start_x, y, 0.), Vec3::new(end_x, y, 0.)) + translation( + Vec3::new(start_x, y, 0.), + Vec3::new(end_x, y, 0.), + ), ), ComponentTween::new_target( TargetComponent::marker(), AngleZ { start: angle_start, end: angle_end, - delta: false + delta: false, }, ), )); @@ -160,7 +169,7 @@ fn setup(mut commands: Commands) { commands .spawn((sprite(start_x, y), AnimationTarget)) .with_children(|c| { - c.spawn(TimeRunner::new(Duration::from_secs(5))) + c.spawn((TimeRunner::new(Duration::from_secs(5)), TimeContext::<()>::default())) .with_children(|c| { c.spawn(( TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), @@ -170,7 +179,7 @@ fn setup(mut commands: Commands) { Translation { start: Vec3::new(start_x, y, 0.), end: Vec3::new(end_x, y, 0.), - delta: false + delta: false, }, ), ComponentTween::new_target( @@ -178,7 +187,7 @@ fn setup(mut commands: Commands) { AngleZ { start: angle_start, end: angle_end, - delta: false + delta: false, }, ), )); @@ -205,21 +214,24 @@ fn setup(mut commands: Commands) { let sprite = commands.spawn(sprite(start_x, y)).id(); commands - .spawn(TimeRunner::new(Duration::from_secs(5))) + .spawn((TimeRunner::new(Duration::from_secs(5)),TimeContext::<()>::default())) .with_children(|c| { c.spawn(( TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), EaseKind::QuadraticInOut, ComponentTween::new_target( sprite, - translation(Vec3::new(start_x, y, 0.), Vec3::new(end_x, y, 0.)) + translation( + Vec3::new(start_x, y, 0.), + Vec3::new(end_x, y, 0.), + ), ), ComponentTween::new_target( sprite, AngleZ { start: angle_start, end: angle_end, - delta: false + delta: false, }, ), )); From e945bb574cf0c544c75653ae6f6c4a3e1f6e3530 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:06:29 +0200 Subject: [PATCH 09/68] add a new example with fixed update registration --- examples/demo/time_steps.rs | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 examples/demo/time_steps.rs diff --git a/examples/demo/time_steps.rs b/examples/demo/time_steps.rs new file mode 100644 index 0000000..7d3147d --- /dev/null +++ b/examples/demo/time_steps.rs @@ -0,0 +1,62 @@ +use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; +use bevy_tween::{ + TweenScheduleAndStepDependentPlugins, TweenScheduleIndependentPlugins, + TweenSchedulesDependentPlugins, combinator::*, prelude::*, + tween::AnimationTarget, +}; +use std::time::Duration; + +fn secs(secs: f32) -> Duration { + Duration::from_secs_f32(secs) +} + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins, + TweenScheduleIndependentPlugins, + TweenSchedulesDependentPlugins { + schedules: vec![FixedLast.intern()], + }, + TweenScheduleAndStepDependentPlugins::::for_schedule( + FixedLast.intern(), + ), + )) + .insert_resource(Time::::from_seconds(0.25)) + .add_systems(Startup, (setup, spawn_circle_with_tweens)) + .run(); +} + +fn setup(mut commands: Commands) { + commands.spawn(Camera2d); +} + +fn spawn_circle_with_tweens( + mut commands: Commands, + asset_server: Res, +) { + let circle_filled_image = asset_server.load("circle_filled.png"); + let float_duration = secs(4.0); + let circle_transform = Transform::from_translation(Vec3::Y * -200.0); + let circle = AnimationTarget.into_target(); + let mut circle_transform_state = circle.transform_state(circle_transform); + + let mut circle_commands = commands.spawn(( + Sprite { + image: circle_filled_image, + ..default() + }, + circle_transform, + AnimationTarget, + )); + + circle_commands + .animation_for_timestep::() + .repeat(Repeat::Infinitely) + .repeat_style(RepeatStyle::PingPong) + .insert(tween( + float_duration, + EaseKind::CircularIn, + circle_transform_state.translation_delta_by(Vec3::Y * 400.0), + )); +} From 51c3a73a548e6c7cc7a2d4ffd6965a7f70430b0c Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:06:43 +0200 Subject: [PATCH 10/68] update error to match bevy 0.18 --- src/tween/systems.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 7b15f92..35277b3 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -42,8 +42,8 @@ impl From<&QueryEntityError> for QueryEntityErrorWithoutWorld { E::QueryDoesNotMatch(entity, archetype_id) => { EH::QueryDoesNotMatch(*entity, *archetype_id) } - E::EntityDoesNotExist(entity_does_not_exist_error) => { - EH::EntityDoesNotExist(entity_does_not_exist_error.entity) + E::NotSpawned(entity_not_spawned_error) => { + EH::EntityDoesNotExist(entity_not_spawned_error.entity()) } E::AliasedMutability(entity) => EH::AliasedMutability(*entity), } From e9953ae58333451a4ec1725bb3d66669838da6e9 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:06:56 +0200 Subject: [PATCH 11/68] update change log and cargos --- CHANGELOG.md | 16 + Cargo.lock | 1610 +++++++++++++++++++++----------------------------- Cargo.toml | 17 +- 3 files changed, 707 insertions(+), 936 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8063b4..8a79450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## unreleased + +Breaking: +- rename `TweenAppResource`'s `schedule` field to `default_schedule` now that there can be more +- add `enable_time_runner_debug` field to `TweenCorePlugin` + +- Add `animation_for_timestep()` for animation creation on different time steps (for example, `Fixed`) +- Add the ability to register systems for different schedules other than the default one (important if you want the animators from the bullet above to update the interpolation values at the right time) + - To do that (see `time_steps.rs` example): + - do not register `DefaultTweenPlugins` + - register `TweenScheduleIndependentPlugins` + - register `TweenSchedulesDependentPlugins { schedules: [your_schedules_here] }` + - for each `TimeCtx`, choose a schedule in which it should be applied, then register + `TweenScheduleAndStepDependentPlugins::::for_schedule([schedule_here])` + - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` + ## v0.11.0 - 2026-01-01 - Add `EventEmittingTween` to all event-emitting tweens, no matter their `Data` type diff --git a/Cargo.lock b/Cargo.lock index 2c9d048..96f7164 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,9 +26,9 @@ checksum = "cf203f9d3bd8f29f98833d1fbef628df18f759248a547e7e01cfbf63cda36a99" [[package]] name = "accesskit_consumer" -version = "0.30.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd06f5fea9819250fffd4debf926709f3593ac22f8c1541a2573e5ee0ca01cd" +checksum = "db81010a6895d8707f9072e6ce98070579b43b717193d2614014abd5cb17dd43" dependencies = [ "accesskit", "hashbrown 0.15.5", @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "accesskit_macos" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fbaf15815f39084e0cb24950c232f0e3634702c2dfbf182ae3b4919a4a1d45" +checksum = "a0089e5c0ac0ca281e13ea374773898d9354cc28d15af9f0f7394d44a495b575" dependencies = [ "accesskit", "accesskit_consumer", @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.29.1" +version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "792991159fa9ba57459de59e12e918bb90c5346fea7d40ac1a11f8632b41e63a" +checksum = "d2d63dd5041e49c363d83f5419a896ecb074d309c414036f616dc0b04faca971" dependencies = [ "accesskit", "accesskit_consumer", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "accesskit_winit" -version = "0.29.1" +version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9db0ea66997e3f4eae4a5f2c6b6486cf206642639ee629dbbb860ace1dec87" +checksum = "c8cfabe59d0eaca7412bfb1f70198dd31e3b0496fee7e15b066f9c36a1a140a0" dependencies = [ "accesskit", "accesskit_macos", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -109,7 +109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.9.4", + "bitflags 2.10.0", "cc", "cesu8", "jni", @@ -262,9 +262,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.1" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ "event-listener", "event-listener-strategy", @@ -305,26 +305,20 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "bevy" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3ee8652fe0577fd8a99054e147740850140d530be8e044a9be4e23a3e8a24" +checksum = "ec689b5a79452b6f777b889bbff22d3216b82a8d2ab7814d4a0eb571e9938d97" dependencies = [ "bevy_internal", ] [[package]] name = "bevy-inspector-egui" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d5b2dcce63a8f20cc5df7ec28630a7a8124a9210dfa3bb4e4636dae67731fe" +checksum = "265c78b2d2b770351e2eb90c5bc997c7036d453a4e2cd62e066561fefeecedec" dependencies = [ "bevy-inspector-egui-derive", "bevy_app", @@ -334,6 +328,7 @@ dependencies = [ "bevy_core_pipeline", "bevy_ecs", "bevy_egui", + "bevy_gizmos", "bevy_image", "bevy_light", "bevy_log", @@ -360,9 +355,9 @@ dependencies = [ [[package]] name = "bevy-inspector-egui-derive" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428bb0621707f70099d4697516ea17c16cc0a215253540119cbec4d2f97a24be" +checksum = "8405b6aee62eebfc27a95c513e04398869fb7911ea8266ec91675994b11eb749" dependencies = [ "proc-macro2", "quote", @@ -371,9 +366,9 @@ dependencies = [ [[package]] name = "bevy_a11y" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6702a82db1b383641fc7c503451847cdafb57076c203cd3bfe549d3eeef474c3" +checksum = "ef69b6d2dec07cbf407c63f6987e1746e4b735a9beea51f4bfc25ad49e344f75" dependencies = [ "accesskit", "bevy_app", @@ -384,18 +379,18 @@ dependencies = [ [[package]] name = "bevy_android" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b2d9435e9fe8d7107bb795a6140277872ad5b992cb3934f8d28cfd11040f6f" +checksum = "008133458cfe0d43a8870bfc4c5a729467cc5d9246611462add38bcf45ed896f" dependencies = [ "android-activity", ] [[package]] name = "bevy_app" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4fc5dfe9d1d9b8233e1878353b5e66a3f5910c2131d3abf68f9a4116b2d433" +checksum = "2271a0123a7cc355c3fe98754360c75aa84b29f2a6b1a9f8c00aac427570d174" dependencies = [ "bevy_derive", "bevy_ecs", @@ -408,7 +403,7 @@ dependencies = [ "ctrlc", "downcast-rs", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", "wasm-bindgen", "web-sys", @@ -416,23 +411,25 @@ dependencies = [ [[package]] name = "bevy_asset" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357787dbfaba3f73fd185e15d6df70605bddaa774f2ebbcab1aaa031f21fb6c2" +checksum = "b1f7361669d1426a3359cb92f890ef9c62bd6e6b67f0190d2c5279d25ce24168" dependencies = [ "async-broadcast", + "async-channel", "async-fs", "async-lock", "atomicow", "bevy_android", "bevy_app", "bevy_asset_macros", + "bevy_diagnostic", "bevy_ecs", "bevy_platform", "bevy_reflect", "bevy_tasks", "bevy_utils", - "bitflags 2.9.4", + "bitflags 2.10.0", "blake3", "crossbeam-channel", "derive_more", @@ -441,12 +438,12 @@ dependencies = [ "either", "futures-io", "futures-lite", + "futures-util", "js-sys", - "parking_lot", "ron", "serde", "stackfuture", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "uuid", "wasm-bindgen", @@ -456,9 +453,9 @@ dependencies = [ [[package]] name = "bevy_asset_macros" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa09271d4ca0bf31fda3a9ad57273775d448a05c4046d9367f71d29968d85b4" +checksum = "288e1edf17069afe2e02a0c0e7e5936b3d22a67c7d2dc9201a27e4451875f909" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -468,9 +465,9 @@ dependencies = [ [[package]] name = "bevy_camera" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af1d5a57fde6e577e7b1db58996afb381618294be75a37b3070a20d309678b0" +checksum = "48c7e1f2a5da1755cd58e45c762f4ea2d72cef6c480f9c8ddbadbd2a4380c616" dependencies = [ "bevy_app", "bevy_asset", @@ -488,15 +485,15 @@ dependencies = [ "downcast-rs", "serde", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-types", ] [[package]] name = "bevy_color" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49504fac6b9897f03b4bdc0189c04ef1ba0a9b37926343aa520a71619e90e116" +checksum = "74727302424d7ffc23528a974dbb44a34708662926e1a3bfc5040493f858886e" dependencies = [ "bevy_math", "bevy_reflect", @@ -504,21 +501,22 @@ dependencies = [ "derive_more", "encase", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-types", ] [[package]] name = "bevy_core_pipeline" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af7e735685a652a8dba41b886f1330faeb57d4c61398917b7e49b09a7a1c3c1" +checksum = "a9e6bf0ba878bb5dd00ad4d70875b08eb11367829668c70d95785f5483ddb1cb" dependencies = [ "bevy_app", "bevy_asset", "bevy_camera", "bevy_color", "bevy_derive", + "bevy_diagnostic", "bevy_ecs", "bevy_image", "bevy_math", @@ -529,19 +527,19 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.9.4", + "bitflags 2.10.0", "nonmax", "radsort", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] [[package]] name = "bevy_derive" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9396b256b366a43d7f61d1f230cdab0a512fb4712cbf7d688f3d6fce4c5ea8a" +checksum = "70b6a05c31f54c83d681f1b8699bbaf581f06b25a40c9a6bb815625f731f5ba9" dependencies = [ "bevy_macro_utils", "quote", @@ -550,9 +548,9 @@ dependencies = [ [[package]] name = "bevy_diagnostic" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cdb0ed0c8423570fbbb7c4fc2719a203dd40928fefff45f76ef0889685a446" +checksum = "aca4caa8a9014a435dca382b1bdebaee4363e9be69882c598fc4ff4d7cd56e6a" dependencies = [ "atomic-waker", "bevy_app", @@ -567,9 +565,9 @@ dependencies = [ [[package]] name = "bevy_ecs" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dd5229dd00d00e70ac6b2fc0a139961252f6ce07d3d268cfcac0da86d5bde4" +checksum = "24637a7c8643cab493f4085cda6bde4895f0e0816699c59006f18819da2ca0b8" dependencies = [ "arrayvec", "bevy_ecs_macros", @@ -578,7 +576,7 @@ dependencies = [ "bevy_reflect", "bevy_tasks", "bevy_utils", - "bitflags 2.9.4", + "bitflags 2.10.0", "bumpalo", "concurrent-queue", "derive_more", @@ -589,15 +587,15 @@ dependencies = [ "serde", "slotmap", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", ] [[package]] name = "bevy_ecs_macros" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d83bdd2285af4867e76c691406e0a4b55611b583d0c45b6ac7bcec1b45fd48" +checksum = "6eb14c18ca71e11c69fbae873c2db129064efac6d52e48d0127d37bfba1acfa8" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -607,14 +605,15 @@ dependencies = [ [[package]] name = "bevy_egui" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda7a2fad5e98cfed11298b8ff0885aa112d3d3ff6d67c8558f22b8e0fbeba5" +checksum = "73f67a59399c0e9cf009ea4ede92e43b413ffe3cfc465ff4dc2679ccad3bdf7e" dependencies = [ "arboard", "bevy_app", "bevy_asset", "bevy_camera", + "bevy_color", "bevy_core_pipeline", "bevy_derive", "bevy_ecs", @@ -623,14 +622,12 @@ dependencies = [ "bevy_log", "bevy_math", "bevy_mesh", - "bevy_picking", "bevy_platform", "bevy_reflect", "bevy_render", "bevy_shader", "bevy_time", "bevy_transform", - "bevy_ui_render", "bevy_utils", "bevy_window", "bevy_winit", @@ -646,16 +643,15 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webbrowser", "wgpu-types", "winit", ] [[package]] name = "bevy_encase_derive" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7179e985f3f1b99265cb87fe194db3b00aee8e2914888d621ff9826e1417ee19" +checksum = "0f89146a8fcbfe47310fc929ee762dd3b08d4de3e3371c601529cfa8eeb861de" dependencies = [ "bevy_macro_utils", "encase_derive_impl", @@ -663,48 +659,63 @@ dependencies = [ [[package]] name = "bevy_gizmos" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebb9e3ca4938b48e5111151ce4b08f0e6fc207b854db08fa2d8de15ecabe8f8" +checksum = "bc78a5699580c2dce078f4c099028d26525a5a38e8eb587a31854c660a3c5ff7" dependencies = [ "bevy_app", "bevy_asset", "bevy_camera", "bevy_color", - "bevy_core_pipeline", "bevy_ecs", "bevy_gizmos_macros", - "bevy_image", - "bevy_light", "bevy_math", - "bevy_mesh", "bevy_reflect", - "bevy_render", - "bevy_shader", - "bevy_sprite_render", "bevy_time", "bevy_transform", "bevy_utils", - "bytemuck", - "tracing", ] [[package]] name = "bevy_gizmos_macros" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c4b3c3aac86f0db85d4f708883ebdc735c3f88ac5b84c033874fcdd3540a9d" +checksum = "60bb92e0ef80ff7c59429133244765515db3d313fae77ee67ffe94dab5b2725d" dependencies = [ "bevy_macro_utils", "quote", "syn", ] +[[package]] +name = "bevy_gizmos_render" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fde3172a31f81033b4f497dd9df84476f527fadb00936ede380fb646c402eb" +dependencies = [ + "bevy_app", + "bevy_asset", + "bevy_camera", + "bevy_core_pipeline", + "bevy_ecs", + "bevy_gizmos", + "bevy_image", + "bevy_math", + "bevy_mesh", + "bevy_render", + "bevy_shader", + "bevy_sprite_render", + "bevy_transform", + "bevy_utils", + "bytemuck", + "tracing", +] + [[package]] name = "bevy_image" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d546bbe2486bfa14971517e7ef427a9384749817c201d3afc60de0325cf52f11" +checksum = "809101ebe678a76c4c5ba3ecad255cde9be3ae0af591cf0143ba2c157afb55e9" dependencies = [ "bevy_app", "bevy_asset", @@ -714,7 +725,7 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_utils", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "futures-lite", "guillotiere", @@ -724,16 +735,16 @@ dependencies = [ "rectangle-pack", "ruzstd", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] [[package]] name = "bevy_input" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca955b99f4dc2059e9c8574f8d95a5dd5002809fda80d062a94a553c571a467" +checksum = "9c2853993baf27b963a417d3603a73e02e39c5041913cd1ba7211b0a3037b191" dependencies = [ "bevy_app", "bevy_ecs", @@ -743,31 +754,30 @@ dependencies = [ "derive_more", "log", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] name = "bevy_input_focus" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de4d1d0e833e31beba1f28a77152b35f946e8c45df364ec4969d58788ab9de7f" +checksum = "05fc0fae5e4e081180f7f7bf8023a2b97dad13dcb5fa79eba50cda5bb95699a9" dependencies = [ "bevy_app", "bevy_ecs", "bevy_input", "bevy_math", - "bevy_picking", "bevy_reflect", "bevy_window", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] name = "bevy_internal" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5e645f9e1a24c9667c768b6233beaf4e241739d8ca4fbba59435cc27aabad5" +checksum = "57463815630ea71221c0b8e7bff72d816a3071a89507c45f9e2686fbb5e1956b" dependencies = [ "bevy_a11y", "bevy_android", @@ -779,7 +789,7 @@ dependencies = [ "bevy_derive", "bevy_diagnostic", "bevy_ecs", - "bevy_gizmos", + "bevy_gizmos_render", "bevy_image", "bevy_input", "bevy_input_focus", @@ -806,9 +816,9 @@ dependencies = [ [[package]] name = "bevy_light" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47093733280976ebd595f6e25f76603d5067ca4eb7544e59ecb0dd2fc5147810" +checksum = "4f9968b8f8a6a766a88b66144474c39d1415edc277d042fec1526eae85e1f8b4" dependencies = [ "bevy_app", "bevy_asset", @@ -827,9 +837,9 @@ dependencies = [ [[package]] name = "bevy_log" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a2d4ea086ac4663ab9dfb056c7b85eee39e18f7e3e9a4ae6e39897eaa155c5" +checksum = "406304a9b867a2de98c3edf0cc9e5a608fad1a1ddc567e15e72c186a8273ef51" dependencies = [ "android_log-sys", "bevy_app", @@ -845,9 +855,9 @@ dependencies = [ [[package]] name = "bevy_lookup_curve" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ab71f73e9cb3fdcb8c0003394a9a5dd8c997a585e56a7e4c5df33a1d651d94" +checksum = "a28269b0a2024f48dd04636cca329a47b4d46690cc0a71d5c01b3645a16db97e" dependencies = [ "bevy_app", "bevy_asset", @@ -860,16 +870,15 @@ dependencies = [ "egui", "ron", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] name = "bevy_macro_utils" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d984f9f8bd0f0d9fb020492a955e641e30e7a425f3588bf346cb3e61fec3c3" +checksum = "0b7272fca0bf30d8ca2571a803598856104b63e5c596d52850f811ed37c5e1e3" dependencies = [ - "parking_lot", "proc-macro2", "quote", "syn", @@ -878,11 +887,12 @@ dependencies = [ [[package]] name = "bevy_math" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa74ae5d968749cc073da991757d3c7e3504ac6dbaac5f8c2a54b9d19b0b7ed" +checksum = "6a815c514b8a6f7b11508cdc8b3a4bf0761e96a14227af40aa93cb1160989ce0" dependencies = [ "approx", + "arrayvec", "bevy_reflect", "derive_more", "glam", @@ -891,16 +901,15 @@ dependencies = [ "rand", "rand_distr", "serde", - "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", ] [[package]] name = "bevy_mesh" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9a0ea86abbd17655bc6f9f8d94461dfcd0322431f752fc03748df8b335eff2" +checksum = "aacf09d0ffd1a15baf8d201c4a34b918912a506395c2817aa55ab3d3776c09f2" dependencies = [ "bevy_app", "bevy_asset", @@ -912,11 +921,11 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_transform", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "derive_more", "hexasphere", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] @@ -929,9 +938,9 @@ checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" [[package]] name = "bevy_pbr" -version = "0.17.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8c76337a6ae9d73d50be168aeee974d05fdeda9129a413eaff719e3b7b5fea" +checksum = "69cc361c65035f7e531b592d99bce95b6ab3f643cae2abe97dfa7681363159a6" dependencies = [ "bevy_app", "bevy_asset", @@ -943,6 +952,7 @@ dependencies = [ "bevy_ecs", "bevy_image", "bevy_light", + "bevy_log", "bevy_math", "bevy_mesh", "bevy_platform", @@ -951,7 +961,7 @@ dependencies = [ "bevy_shader", "bevy_transform", "bevy_utils", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "derive_more", "fixedbitset", @@ -959,45 +969,20 @@ dependencies = [ "offset-allocator", "smallvec", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] -[[package]] -name = "bevy_picking" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b371779713b40dea83b24cdb95054fe999fe8372351a317c4fb768859ac5f010" -dependencies = [ - "bevy_app", - "bevy_asset", - "bevy_camera", - "bevy_derive", - "bevy_ecs", - "bevy_input", - "bevy_math", - "bevy_mesh", - "bevy_platform", - "bevy_reflect", - "bevy_time", - "bevy_transform", - "bevy_window", - "crossbeam-channel", - "tracing", - "uuid", -] - [[package]] name = "bevy_platform" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4691af6d7cfd1b5deb2fc926a43a180a546cdc3fe1e5a013fcee60db9bb2c81f" +checksum = "9b29ea749a8e85f98186ab662f607b885b97c804bb14cdb0cdf838164496d474" dependencies = [ "critical-section", "foldhash 0.2.0", "futures-channel", - "getrandom", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "js-sys", "portable-atomic", "portable-atomic-util", @@ -1010,9 +995,9 @@ dependencies = [ [[package]] name = "bevy_post_process" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b857972f5d56b43b0dce2c843b75b64d5fbbd0f6177f6ecccd75e7e41f72deb" +checksum = "e8e1116cbc35637f267a29c7d2fe376e020f2b4402d6b525d328bae9c10460c7" dependencies = [ "bevy_app", "bevy_asset", @@ -1030,25 +1015,25 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.9.4", + "bitflags 2.10.0", "nonmax", "radsort", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] [[package]] name = "bevy_ptr" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d24d7906c7de556033168b3485de36c59049fbaef0c2c44c715a23e0329b10" +checksum = "4f98cbc6d34bbdb58240b72ed1731931b4991a893b3a3238bb7c42ae054aa676" [[package]] name = "bevy_reflect" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5472b91928c0f3e4e3988c0d036b00719f19520f53a0c3f8c2af72f00e693c5" +checksum = "2b2a977e2b8dba65b6e9c11039c5f9ef108be428f036b3d1cac13ad86ec59f9c" dependencies = [ "assert_type_match", "bevy_platform", @@ -1061,11 +1046,12 @@ dependencies = [ "erased-serde", "foldhash 0.2.0", "glam", + "indexmap", "inventory", "serde", "smallvec", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", "variadics_please", "wgpu-types", @@ -1073,9 +1059,9 @@ dependencies = [ [[package]] name = "bevy_reflect_derive" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "083784255162fa39960aa3cf3c23af0e515db2daa7f2e796ae34df993f4d3f6c" +checksum = "067af30072b1611fda1a577f1cb678b8ea2c9226133068be808dd49aac30cef0" dependencies = [ "bevy_macro_utils", "indexmap", @@ -1087,9 +1073,9 @@ dependencies = [ [[package]] name = "bevy_render" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44117cbc9448b5a3118eb9c65bd9ec4c574be996148793be2443257daae6eb05" +checksum = "d6b2c9a276646bde8ba58a7e15711b459fb4a5cdf46c47059b7a310f97a70d9c" dependencies = [ "async-channel", "bevy_app", @@ -1112,12 +1098,13 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "derive_more", "downcast-rs", "encase", "fixedbitset", + "glam", "image", "indexmap", "js-sys", @@ -1126,7 +1113,7 @@ dependencies = [ "offset-allocator", "send_wrapper", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "variadics_please", "wasm-bindgen", @@ -1136,9 +1123,9 @@ dependencies = [ [[package]] name = "bevy_render_macros" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9557b7b6b06b1b70c147581f4f410c2de73b6f6f0e82915887020f953bacb5a" +checksum = "03e16b8cac95b87021399ed19f6ab79c0b1e03101a448e3a0240934f78f66a56" dependencies = [ "bevy_macro_utils", "proc-macro2", @@ -1148,9 +1135,9 @@ dependencies = [ [[package]] name = "bevy_shader" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a655de9f64e113a6e37be76401fb0d6cb84ed7cc4f891e70af4e39d26e9080c3" +checksum = "4a14cb0991b2482a66b94728cbcf7482d1b74364be017197396435d3d542b8d3" dependencies = [ "bevy_asset", "bevy_platform", @@ -1158,16 +1145,16 @@ dependencies = [ "naga", "naga_oil", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] [[package]] name = "bevy_sprite" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b9a80aadf102ef0b012ceba5326253638c891994c303479e9973092e4e1c8b" +checksum = "b2b3921ce1a8ce801c29d9552cbc204548bfeb16b9b829045c9e82b5917d99cc" dependencies = [ "bevy_app", "bevy_asset", @@ -1189,9 +1176,9 @@ dependencies = [ [[package]] name = "bevy_sprite_render" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eec49a2a9185526f9828559a40b6f66d4c2dbae2df8ea2936d88ba449a5e86a" +checksum = "ed40642fa0e1330df65b6a1bf0b14aa32fcd9d7f3306e08e0784c10362bd6265" dependencies = [ "bevy_app", "bevy_asset", @@ -1211,7 +1198,7 @@ dependencies = [ "bevy_text", "bevy_transform", "bevy_utils", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "derive_more", "fixedbitset", @@ -1221,9 +1208,9 @@ dependencies = [ [[package]] name = "bevy_state" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e8556a55d548844fc067fac6657b62f8073c94bd7e13c86aa7573f4c2a67b3" +checksum = "9453325ca0c185a043f4515158daa15a8ab19139a60fd1edaf87fbe896cb7f83" dependencies = [ "bevy_app", "bevy_ecs", @@ -1237,9 +1224,9 @@ dependencies = [ [[package]] name = "bevy_state_macros" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda45913b1d6470c6b751656e72fb3f25ca6b5b7b2ee055b294aaed1eb7e5ba" +checksum = "d733081e57e49b3c43bdf3766d1de74c7df32e0f4db20c20437c85b1d18908de" dependencies = [ "bevy_macro_utils", "quote", @@ -1248,9 +1235,9 @@ dependencies = [ [[package]] name = "bevy_tasks" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbbfa5a58a16c4228434d3018c23fde3d78dcd76ec5f5b2b482a21f4b158dd3" +checksum = "990ffedd374dd2c4fe8f0fd4bcefd5617d1ee59164b6c3fcc356a69b48e26e8e" dependencies = [ "async-channel", "async-executor", @@ -1266,9 +1253,9 @@ dependencies = [ [[package]] name = "bevy_text" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc144cc6a30ed44a88e342c22d9e3a66a0993a74f792ae07ba79318efb41a86d" +checksum = "ecbb6eeaa9a63d1f8aae8c0d79f8d5e14c584a962a4ef9f69115fd7d10941101" dependencies = [ "bevy_app", "bevy_asset", @@ -1285,16 +1272,16 @@ dependencies = [ "serde", "smallvec", "sys-locale", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] [[package]] name = "bevy_time" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32835c3dbe082fbbe7d4f2f37f655073421f2882d4320ac2d59f922474260de4" +checksum = "e4c68b78e7ca1cc10c811cd1ded8350f53f2be11eb46946879a74c684026bff7" dependencies = [ "bevy_app", "bevy_ecs", @@ -1308,11 +1295,11 @@ dependencies = [ [[package]] name = "bevy_time_runner" version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea5113f78f7bc47d75f1449f0accbc0350b117880d2ddb5a197fe84744e3302" +source = "git+https://github.com/Multirious/bevy_time_runner?branch=main#e3f116bcc94478783457be2a2cfc11f87c2db3e9" dependencies = [ "bevy_app", "bevy_ecs", + "bevy_log", "bevy_reflect", "bevy_time", "rustc_version", @@ -1320,9 +1307,9 @@ dependencies = [ [[package]] name = "bevy_transform" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41fabfeaa53f51ff5ccf4d87e66836293159d50d21f6d3e16c93efb7c30f969" +checksum = "b30e3957de42c2f7d88dfe8428e739b74deab8932d2a8bbb9d4eefbd64b6aa34" dependencies = [ "bevy_app", "bevy_ecs", @@ -1333,7 +1320,7 @@ dependencies = [ "bevy_utils", "derive_more", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1353,9 +1340,9 @@ dependencies = [ [[package]] name = "bevy_ui" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa0fe27b8c641c2537480774dfd9198d56779371b04dd76618db39da4e7c7483" +checksum = "889c6892e9c5c308ab225a1322d07fb2358ccf39493526cda4d5f083d717773d" dependencies = [ "accesskit", "bevy_a11y", @@ -1367,6 +1354,7 @@ dependencies = [ "bevy_ecs", "bevy_image", "bevy_input", + "bevy_input_focus", "bevy_math", "bevy_platform", "bevy_reflect", @@ -1378,46 +1366,15 @@ dependencies = [ "derive_more", "smallvec", "taffy", - "thiserror 2.0.17", - "tracing", -] - -[[package]] -name = "bevy_ui_render" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adae9770089e04339d003afe7abe7153fe71600d81c828f964c7ac329b04d5b9" -dependencies = [ - "bevy_app", - "bevy_asset", - "bevy_camera", - "bevy_color", - "bevy_core_pipeline", - "bevy_derive", - "bevy_ecs", - "bevy_image", - "bevy_math", - "bevy_mesh", - "bevy_platform", - "bevy_reflect", - "bevy_render", - "bevy_shader", - "bevy_sprite", - "bevy_sprite_render", - "bevy_text", - "bevy_transform", - "bevy_ui", - "bevy_utils", - "bytemuck", - "derive_more", + "thiserror 2.0.18", "tracing", ] [[package]] name = "bevy_utils" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "789d04f88c764877a4552e07745b402dbc45f5d0545e6d102558f2f1752a1d89" +checksum = "e258c44d869f9c41ac0f88a16815c67f2569eb9fff4716828a40273d127b6f84" dependencies = [ "bevy_platform", "disqualified", @@ -1426,9 +1383,9 @@ dependencies = [ [[package]] name = "bevy_window" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae54ec7a0fc344278592a688a01b57b32182abc3ca7d47040773c4cbc2e15e0" +checksum = "869a56f1da2544641734018e1f1caa660299cd6e3af794f3fa0df72293d8eed2" dependencies = [ "bevy_app", "bevy_ecs", @@ -1443,9 +1400,9 @@ dependencies = [ [[package]] name = "bevy_winit" -version = "0.17.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feeaa46d3c4480323e690de8a4ca7f914c074af1f5f70ee3246392992dbf4a0c" +checksum = "8142a3749fc491eeae481c30bb3830cf5a71d2fa3dba4d450a42792f6d39eb2d" dependencies = [ "accesskit", "accesskit_winit", @@ -1494,25 +1451,26 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" dependencies = [ "bytemuck", - "serde", + "serde_core", ] [[package]] name = "blake3" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", + "cpufeatures", ] [[package]] @@ -1530,6 +1488,15 @@ dependencies = [ "objc2 0.5.2", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.3", +] + [[package]] name = "blocking" version = "1.6.2" @@ -1545,9 +1512,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", @@ -1556,9 +1523,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "bytemuck" @@ -1594,9 +1561,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "calloop" @@ -1604,7 +1571,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "log", "polling", "rustix 0.38.44", @@ -1614,9 +1581,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.40" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d05d92f4b1fd76aad469d46cdd858ca761576082cd37df81416691e50199fb" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", "jobserver", @@ -1632,9 +1599,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -1715,9 +1682,9 @@ checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "constgebra" @@ -1728,6 +1695,15 @@ dependencies = [ "const_soft_float", ] +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1784,34 +1760,53 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation 0.10.1", "libc", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cosmic-text" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da46a9d5a8905cc538a4a5bceb6a4510de7a51049c5588c0114efce102bcbbe8" +checksum = "c4cadaea21e24c49c0c82116f2b465ae6a49d63c90e428b0f8d9ae1f638ac91f" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "fontdb", + "harfrust", + "linebender_resource_handle", "log", "rangemap", "rustc-hash", - "rustybuzz", "self_cell", + "skrifa 0.39.0", "smol_str", "swash", "sys-locale", - "ttf-parser 0.21.1", "unicode-bidi", "unicode-linebreak", "unicode-script", "unicode-segmentation", ] +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -1859,13 +1854,13 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "ctrlc" -version = "3.5.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3" +checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" dependencies = [ - "dispatch", + "dispatch2", "nix", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -1876,27 +1871,29 @@ checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" [[package]] name = "data-encoding" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn", "unicode-xid", ] @@ -1913,21 +1910,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", + "block2 0.6.2", + "libc", "objc2 0.6.3", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "disqualified" version = "1.0.0" @@ -1945,9 +1933,9 @@ dependencies = [ [[package]] name = "document-features" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" dependencies = [ "litrs", ] @@ -1966,9 +1954,9 @@ checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] name = "ecolor" -version = "0.32.3" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bdf37f8d5bd9aa7f753573fdda9cf7343afa73dd28d7bfe9593bd9798fc07e" +checksum = "71ddb8ac7643d1dba1bb02110e804406dd459a838efcb14011ced10556711a8e" dependencies = [ "bytemuck", "emath", @@ -1976,14 +1964,15 @@ dependencies = [ [[package]] name = "egui" -version = "0.32.3" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5d0306cd61ca75e29682926d71f2390160247f135965242e904a636f51c0dc" +checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" dependencies = [ "ahash", - "bitflags 2.9.4", + "bitflags 2.10.0", "emath", "epaint", + "log", "nohash-hasher", "profiling", "smallvec", @@ -1998,39 +1987,38 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "emath" -version = "0.32.3" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd7bc25f769a3c198fe1cf183124bf4de3bd62ef7b4f1eaf6b08711a3af8db" +checksum = "491bdf728bf25ddd9ad60d4cf1c48588fa82c013a2440b91aa7fc43e34a07c32" dependencies = [ "bytemuck", ] [[package]] name = "encase" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02ba239319a4f60905966390f5e52799d868103a533bb7e27822792332504ddd" +checksum = "6e3e0ff2ee0b7aa97428308dd9e1e42369cb22f5fb8dc1c55546637443a60f1e" dependencies = [ "const_panic", "encase_derive", - "glam", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] name = "encase_derive" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5223d6c647f09870553224f6e37261fe5567bc5a4f4cf13ed337476e79990f2f" +checksum = "a4d90c5d7d527c6cb8a3b114efd26a6304d9ab772656e73d8f4e32b1f3d601a2" dependencies = [ "encase_derive_impl", ] [[package]] name = "encase_derive_impl" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1796db3d892515842ca2dfb11124c4bb4a9e58d9f2c5c1072e5bca1b2334507b" +checksum = "c8bad72d8308f7a382de2391ec978ddd736e0103846b965d7e2a63a75768af30" dependencies = [ "proc-macro2", "quote", @@ -2039,9 +2027,9 @@ dependencies = [ [[package]] name = "epaint" -version = "0.32.3" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63adcea970b7a13094fe97a36ab9307c35a750f9e24bf00bb7ef3de573e0fddb" +checksum = "009d0dd3c2163823a0abdb899451ecbc78798dec545ee91b43aff1fa790bab62" dependencies = [ "ab_glyph", "ahash", @@ -2049,6 +2037,7 @@ dependencies = [ "ecolor", "emath", "epaint_default_fonts", + "log", "nohash-hasher", "parking_lot", "profiling", @@ -2056,9 +2045,9 @@ dependencies = [ [[package]] name = "epaint_default_fonts" -version = "0.32.3" +version = "0.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1537accc50c9cab5a272c39300bdd0dd5dca210f6e5e8d70be048df9596e7ca2" +checksum = "5c4fbe202b6578d3d56428fa185cdf114a05e49da05f477b3c7f0fbb221f1862" [[package]] name = "equivalent" @@ -2068,9 +2057,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" +checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" dependencies = [ "serde", "serde_core", @@ -2084,7 +2073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -2095,9 +2084,9 @@ checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" [[package]] name = "euclid" -version = "0.22.11" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" dependencies = [ "num-traits", ] @@ -2160,9 +2149,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0399f9d26e5191ce32c498bebd31e7a3ceabc2745f0ac54af3f335126c3f24b3" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" [[package]] name = "fixedbitset" @@ -2172,9 +2161,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04bcaeafafdd3cd1cb5d986ff32096ad1136630207c49b9091e3ae541090d938" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", "miniz_oxide", @@ -2194,9 +2183,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511e2c18a516c666d27867d2f9821f76e7d591f762e9fc41dd6cc5c90fe54b0b" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] @@ -2212,16 +2201,16 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.16.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.20.0", + "ttf-parser", ] [[package]] @@ -2251,15 +2240,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - [[package]] name = "futures-channel" version = "0.3.31" @@ -2294,6 +2274,37 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "fuzzy-matcher" version = "0.3.7" @@ -2305,35 +2316,36 @@ dependencies = [ [[package]] name = "gethostname" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.2", - "windows-targets 0.52.6", + "rustix 1.1.3", + "windows-link 0.2.1", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", - "wasi", + "wasip2", "wasm-bindgen", ] [[package]] name = "glam" -version = "0.30.8" +version = "0.30.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12d847aeb25f41be4c0ec9587d624e9cd631bc007a8fd7ce3f5851e064c6460" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" dependencies = [ "bytemuck", + "encase", "libm", "rand", "serde_core", @@ -2345,7 +2357,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "gpu-alloc-types", ] @@ -2355,7 +2367,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] @@ -2376,7 +2388,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2387,14 +2399,14 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] name = "grid" -version = "0.15.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36119f3a540b086b4e436bb2b588cf98a68863470e0e880f4d0842f112a3183a" +checksum = "f9e2d4c0a8296178d8802098410ca05d86b17a10bb5ab559b3fb404c1f948220" [[package]] name = "guillotiere" @@ -2408,13 +2420,27 @@ dependencies = [ [[package]] name = "half" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", "num-traits", + "zerocopy", +] + +[[package]] +name = "harfrust" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07" +dependencies = [ + "bitflags 2.10.0", + "bytemuck", + "core_maths", + "read-fonts 0.36.0", + "smallvec", ] [[package]] @@ -2437,160 +2463,55 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "equivalent", + "foldhash 0.2.0", "serde", + "serde_core", ] [[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "portable-atomic", - "stable_deref_trait", -] - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "hexasphere" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" -dependencies = [ - "constgebra", - "glam", - "tinyvec", -] - -[[package]] -name = "hexf-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" - -[[package]] -name = "icu_collections" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - -[[package]] -name = "icu_properties" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "potential_utf", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - -[[package]] -name = "icu_provider" -version = "2.0.0" +name = "heapless" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "2af2455f757db2b292a9b1768c4b70186d443bcb3b316252d6b540aec1cd89ed" dependencies = [ - "displaydoc", - "icu_locale_core", + "hash32", + "portable-atomic", "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", ] [[package]] -name = "idna" -version = "1.1.0" +name = "hermit-abi" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] -name = "idna_adapter" -version = "1.2.1" +name = "hexasphere" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "29a164ceff4500f2a72b1d21beaa8aa8ad83aec2b641844c659b190cb3ea2e0b" dependencies = [ - "icu_normalizer", - "icu_properties", + "constgebra", + "glam", + "tinyvec", ] +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + [[package]] name = "image" -version = "0.25.8" +version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529feb3e6769d234375c4cf1ee2ce713682b8e76538cb13f9fc23e1400a591e7" +checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" dependencies = [ "bytemuck", "byteorder-lite", @@ -2602,12 +2523,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.4" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", ] [[package]] @@ -2662,9 +2583,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -2676,7 +2597,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff7f53bdf698e7aa7ec916411bbdc8078135da11b66db5182675b2227f6c0d07" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] @@ -2687,9 +2608,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.176" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libloading" @@ -2698,26 +2619,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-link 0.2.0", + "windows-link 0.2.1", ] [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "libc", - "redox_syscall 0.5.18", + "redox_syscall 0.7.0", ] +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -2730,17 +2657,11 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" -[[package]] -name = "litemap" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - [[package]] name = "litrs" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "lock_api" @@ -2753,9 +2674,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "malloc_buf" @@ -2783,9 +2704,9 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" dependencies = [ "libc", ] @@ -2796,7 +2717,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -2817,9 +2738,9 @@ dependencies = [ [[package]] name = "moxcms" -version = "0.7.6" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc7d85f3d741164e8972ad355e26ac6e51b20fcae5f911c7da8f2d8bbbb3f33" +checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" dependencies = [ "num-traits", "pxfm", @@ -2827,18 +2748,18 @@ dependencies = [ [[package]] name = "naga" -version = "26.0.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916cbc7cb27db60be930a4e2da243cf4bc39569195f22fd8ee419cd31d5b662c" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "codespan-reporting", "half", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "hexf-parse", "indexmap", "libm", @@ -2848,15 +2769,15 @@ dependencies = [ "pp-rs", "rustc-hash", "spirv", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-ident", ] [[package]] name = "naga_oil" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b586d3cf5c9b7e13fe2af6e114406ff70773fd80881960378933b63e76f37dd" +checksum = "310c347db1b30e69581f3b84dc9a5c311ed583f67851b39b77953cb7a066c97f" dependencies = [ "codespan-reporting", "data-encoding", @@ -2864,7 +2785,7 @@ dependencies = [ "naga", "regex", "rustc-hash", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "unicode-ident", ] @@ -2875,7 +2796,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "jni-sys", "log", "ndk-sys", @@ -2905,7 +2826,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "libc", @@ -2929,16 +2850,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] name = "nu-ansi-term" -version = "0.50.1" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2953,9 +2874,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" dependencies = [ "num_enum_derive", "rustversion", @@ -2963,9 +2884,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3013,8 +2934,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "libc", "objc2 0.5.2", "objc2-core-data", @@ -3029,7 +2950,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "objc2 0.6.3", "objc2-core-graphics", "objc2-foundation 0.3.2", @@ -3041,8 +2962,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -3054,7 +2975,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -3065,8 +2986,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -3077,7 +2998,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "dispatch2", "objc2 0.6.3", ] @@ -3088,7 +3009,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "dispatch2", "objc2 0.6.3", "objc2-core-foundation", @@ -3101,7 +3022,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", "objc2-metal", @@ -3113,7 +3034,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-contacts", "objc2-foundation 0.2.2", @@ -3131,8 +3052,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "dispatch", "libc", "objc2 0.5.2", @@ -3144,7 +3065,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "objc2 0.6.3", "objc2-core-foundation", ] @@ -3155,7 +3076,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "objc2 0.6.3", "objc2-core-foundation", ] @@ -3166,7 +3087,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", "objc2-foundation 0.2.2", @@ -3178,8 +3099,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -3190,8 +3111,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", "objc2-metal", @@ -3213,8 +3134,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit", "objc2-core-data", @@ -3234,7 +3155,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" dependencies = [ - "block2", + "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", ] @@ -3245,8 +3166,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", "objc2-foundation 0.2.2", @@ -3270,21 +3191,22 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opener" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9024962ab91e00c89d2a14352a8d0fc1a64346bf96f1839b45c09149564e47" +checksum = "a2fa337e0cf13357c13ef1dc108df1333eb192f75fc170bea03fcf1fd404c2ee" dependencies = [ "bstr", "normpath", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "orbclient" -version = "0.3.48" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" +checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd" dependencies = [ + "libc", "libredox", ] @@ -3303,7 +3225,7 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" dependencies = [ - "ttf-parser 0.25.1", + "ttf-parser", ] [[package]] @@ -3332,7 +3254,7 @@ dependencies = [ "libc", "redox_syscall 0.5.18", "smallvec", - "windows-link 0.2.0", + "windows-link 0.2.1", ] [[package]] @@ -3373,6 +3295,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "piper" version = "0.2.4" @@ -3396,7 +3324,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "crc32fast", "fdeflate", "flate2", @@ -3413,15 +3341,15 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.2", - "windows-sys 0.61.1", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" [[package]] name = "portable-atomic-util" @@ -3432,15 +3360,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "potential_utf" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" -dependencies = [ - "zerovec", -] - [[package]] name = "pp-rs" version = "0.2.1" @@ -3476,9 +3395,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -3491,9 +3410,9 @@ checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" [[package]] name = "pxfm" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f9b339b02259ada5c0f4a389b7fb472f933aa17ce176fd2ad98f28bb401fde" +checksum = "7186d3822593aa4393561d186d1393b3923e9d6163d3fbfd6e825e3e6cf3e6a8" dependencies = [ "num-traits", ] @@ -3506,9 +3425,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.41" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -3547,9 +3466,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom", ] @@ -3572,9 +3491,9 @@ checksum = "c3d6831663a5098ea164f89cff59c6284e95f4e3c76ce9848d4529f5ccca9bde" [[package]] name = "rangemap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7e49bb0bf967717f7bd674458b3d6b0c5f48ec7e3038166026a69fc22223" +checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" [[package]] name = "raw-window-handle" @@ -3592,6 +3511,17 @@ dependencies = [ "font-types", ] +[[package]] +name = "read-fonts" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eaa2941a4c05443ee3a7b26ab076a553c343ad5995230cc2b1d3e993bdc6345" +dependencies = [ + "bytemuck", + "core_maths", + "font-types", +] + [[package]] name = "rectangle-pack" version = "0.4.2" @@ -3613,14 +3543,23 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", +] + +[[package]] +name = "redox_syscall" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +dependencies = [ + "bitflags 2.10.0", ] [[package]] name = "regex" -version = "1.11.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -3630,9 +3569,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -3641,9 +3580,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "renderdoc-sys" @@ -3653,14 +3592,15 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "ron" -version = "0.10.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" +checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" dependencies = [ - "base64", - "bitflags 2.9.4", + "bitflags 2.10.0", + "once_cell", "serde", "serde_derive", + "typeid", "unicode-ident", ] @@ -3691,7 +3631,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -3700,15 +3640,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -3717,28 +3657,11 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "rustybuzz" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" -dependencies = [ - "bitflags 2.9.4", - "bytemuck", - "libm", - "smallvec", - "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-properties", - "unicode-script", -] - [[package]] name = "ruzstd" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640bec8aad418d7d03c72ea2de10d5c646a598f9883c7babc160d91e3c1b26c" +checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01" dependencies = [ "twox-hash", ] @@ -3760,9 +3683,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "self_cell" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" [[package]] name = "semver" @@ -3823,9 +3746,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "skrifa" @@ -3834,7 +3757,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.35.0", +] + +[[package]] +name = "skrifa" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9eb0b904a04d09bd68c65d946617b8ff733009999050f3b851c32fb3cfb60e" +dependencies = [ + "bytemuck", + "read-fonts 0.36.0", ] [[package]] @@ -3845,9 +3778,9 @@ checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slotmap" -version = "1.0.7" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" dependencies = [ "version_check", ] @@ -3882,20 +3815,23 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackfuture" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eae92052b72ef70dafa16eddbabffc77e5ca3574be2f7bc1127b36f0a7ad7f2" +checksum = "115beb9c69db2393ff10b75a1b8587a51716e5551d015001e55320ed279d32f9" +dependencies = [ + "const_panic", +] [[package]] name = "static_assertions" @@ -3915,33 +3851,22 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47846491253e976bdd07d0f9cc24b7daf24720d11309302ccbbc6e6b6e53550a" dependencies = [ - "skrifa", + "skrifa 0.37.0", "yazi", "zeno", ] [[package]] name = "syn" -version = "2.0.106" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sys-locale" version = "0.3.2" @@ -3953,9 +3878,9 @@ dependencies = [ [[package]] name = "taffy" -version = "0.7.7" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4f4d046dd956a47a7e1a2947083d7ac3e6aa3cfaaead36173ceaa5ab11878c" +checksum = "41ba83ebaf2954d31d05d67340fd46cebe99da2b7133b0dd68d70c65473a437b" dependencies = [ "arrayvec", "grid", @@ -3983,11 +3908,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -4003,9 +3928,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -4035,16 +3960,6 @@ dependencies = [ "zune-jpeg", ] -[[package]] -name = "tinystr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tinyvec" version = "1.10.0" @@ -4062,18 +3977,18 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml_datetime" -version = "0.7.2" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.6" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap", "toml_datetime", @@ -4083,18 +3998,18 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.3" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -4103,9 +4018,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -4114,9 +4029,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -4147,9 +4062,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", @@ -4174,23 +4089,14 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - -[[package]] -name = "ttf-parser" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" - [[package]] name = "ttf-parser" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +dependencies = [ + "core_maths", +] [[package]] name = "twox-hash" @@ -4216,23 +4122,11 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" -[[package]] -name = "unicode-bidi-mirroring" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" - -[[package]] -name = "unicode-ccc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" - [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-linebreak" @@ -4240,17 +4134,11 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-properties" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" - [[package]] name = "unicode-script" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" [[package]] name = "unicode-segmentation" @@ -4260,9 +4148,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" @@ -4270,33 +4158,15 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "url" -version = "2.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "uuid" -version = "1.18.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "getrandom", "js-sys", - "serde", + "serde_core", "wasm-bindgen", ] @@ -4333,29 +4203,20 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -4364,27 +4225,14 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-futures" -version = "0.4.54" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -4393,9 +4241,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4403,31 +4251,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -4443,40 +4291,24 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webbrowser" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf4f3c0ba838e82b4e5ccc4157003fb8c324ee24c058470ffb82820becbde98" -dependencies = [ - "core-foundation 0.10.1", - "jni", - "log", - "ndk-context", - "objc2 0.6.3", - "objc2-foundation 0.3.2", - "url", - "web-sys", -] - [[package]] name = "weezl" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "26.0.1" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b6ff82bbf6e9206828e1a3178e851f8c20f1c9028e74dd3a8090741ccd5798" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "document-features", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "log", "naga", "portable-atomic", @@ -4491,17 +4323,18 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "26.0.1" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f62f1053bd28c2268f42916f31588f81f64796e2ff91b81293515017ca8bd9" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.9.4", + "bitflags 2.10.0", + "bytemuck", "cfg_aliases", "document-features", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "indexmap", "log", "naga", @@ -4512,7 +4345,7 @@ dependencies = [ "raw-window-handle", "rustc-hash", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-core-deps-apple", "wgpu-core-deps-windows-linux-android", "wgpu-hal", @@ -4521,33 +4354,33 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18ae5fbde6a4cbebae38358aa73fcd6e0f15c6144b67ef5dc91ded0db125dbdf" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "26.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720a5cb9d12b3d337c15ff0e24d3e97ed11490ff3f7506e7f3d98c68fa5d6f14" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "26.0.4" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df2c64ac282a91ad7662c90bc4a77d4a2135bc0b2a2da5a4d4e267afc034b9e" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.9.4", + "bitflags 2.10.0", "block", "bytemuck", "cfg-if", @@ -4556,13 +4389,14 @@ dependencies = [ "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "libc", "libloading", "log", "metal", "naga", "objc", + "once_cell", "ordered-float", "parking_lot", "portable-atomic", @@ -4572,7 +4406,7 @@ dependencies = [ "raw-window-handle", "renderdoc-sys", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-types", "windows 0.58.0", "windows-core 0.58.0", @@ -4580,16 +4414,16 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "26.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "js-sys", "log", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "web-sys", ] @@ -4599,7 +4433,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -4653,8 +4487,8 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.1", - "windows-interface 0.59.2", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -4684,9 +4518,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.1" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", @@ -4706,9 +4540,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.2" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", @@ -4723,9 +4557,9 @@ checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-link" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-numerics" @@ -4807,16 +4641,16 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.4", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.61.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.0", + "windows-link 0.2.1", ] [[package]] @@ -4852,19 +4686,19 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.4" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.0", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -4890,9 +4724,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -4908,9 +4742,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -4926,9 +4760,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" @@ -4938,9 +4772,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -4956,9 +4790,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -4974,9 +4808,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -4992,9 +4826,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -5010,9 +4844,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winit" @@ -5022,8 +4856,8 @@ checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" dependencies = [ "android-activity", "atomic-waker", - "bitflags 2.9.4", - "block2", + "bitflags 2.10.0", + "block2 0.5.1", "bytemuck", "calloop", "cfg_aliases", @@ -5060,24 +4894,18 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "writeable" -version = "0.6.1" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "x11-dl" @@ -5101,7 +4929,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.2", + "rustix 1.1.3", "x11rb-protocol", ] @@ -5117,7 +4945,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "dlib", "log", "once_cell", @@ -5136,30 +4964,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" -[[package]] -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "zeno" version = "0.3.3" @@ -5168,72 +4972,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.1" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c4f9efc..1f005de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,17 +18,18 @@ resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies.bevy] -version = "0.17.3" +version = "0.18.0" default-features = false features = ["std"] [dependencies.bevy_math] -version = "0.17.3" +version = "0.18.0" default-features = false features = ["curve"] [dependencies.bevy_time_runner] -version = "0.5.2" +git = "https://github.com/Multirious/bevy_time_runner" +branch = "main" [dependencies.serde] version = "1" @@ -40,15 +41,15 @@ version = "0.1.41" features = ["std"] [dependencies.bevy_lookup_curve ] -version = "0.10.0" +version = "0.11.0" optional = true [dev-dependencies] -bevy-inspector-egui = "0.34.0" +bevy-inspector-egui = "0.36.0" rand = "0.9.1" [dev-dependencies.bevy] -version = "0.17.3" +version = "0.18.0" default-features = false features = [ "bevy_window", @@ -170,3 +171,7 @@ required-features = [ [[example]] name = "delta_tweens" path = "examples/demo/delta_tweens.rs" + +[[example]] +name = "time_steps" +path = "examples/demo/time_steps.rs" From b0a00da8faf3c473fc0641723fd4f6e8adc8639e Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Thu, 5 Feb 2026 12:55:09 +0200 Subject: [PATCH 12/68] rename time step to time context --- CHANGELOG.md | 2 +- Cargo.toml | 4 ++-- .../{time_steps.rs => time_context_animation.rs} | 2 +- src/combinator.rs | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) rename examples/demo/{time_steps.rs => time_context_animation.rs} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a79450..e3b3927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Breaking: - rename `TweenAppResource`'s `schedule` field to `default_schedule` now that there can be more - add `enable_time_runner_debug` field to `TweenCorePlugin` -- Add `animation_for_timestep()` for animation creation on different time steps (for example, `Fixed`) +- Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) - Add the ability to register systems for different schedules other than the default one (important if you want the animators from the bullet above to update the interpolation values at the right time) - To do that (see `time_steps.rs` example): - do not register `DefaultTweenPlugins` diff --git a/Cargo.toml b/Cargo.toml index 1f005de..65c7657 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -173,5 +173,5 @@ name = "delta_tweens" path = "examples/demo/delta_tweens.rs" [[example]] -name = "time_steps" -path = "examples/demo/time_steps.rs" +name = "time_context_animation" +path = "examples/demo/time_context_animation.rs" diff --git a/examples/demo/time_steps.rs b/examples/demo/time_context_animation.rs similarity index 97% rename from examples/demo/time_steps.rs rename to examples/demo/time_context_animation.rs index 7d3147d..bfc039b 100644 --- a/examples/demo/time_steps.rs +++ b/examples/demo/time_context_animation.rs @@ -51,7 +51,7 @@ fn spawn_circle_with_tweens( )); circle_commands - .animation_for_timestep::() + .animation_for_time_context::() .repeat(Repeat::Infinitely) .repeat_style(RepeatStyle::PingPong) .insert(tween( diff --git a/src/combinator.rs b/src/combinator.rs index c996609..5e275c8 100644 --- a/src/combinator.rs +++ b/src/combinator.rs @@ -41,7 +41,7 @@ pub trait AnimationBuilderExt { /// Extension trait for types that can be used to make an animation. pub trait AnimationBuilderExtGeneric { /// Construct [`AnimationBuilder`] from [`Self`] - fn animation_for_timestep( + fn animation_for_time_context( &mut self, ) -> AnimationBuilder<'_, TimeCtx> where @@ -52,7 +52,7 @@ impl AnimationBuilderExtGeneric for EntityCommands<'_> { /// Construct [`AnimationBuilder`] from [`EntityCommands`]. /// Use this entity as the animator. /// Tweens will be spawned as children of this entity. - fn animation_for_timestep( + fn animation_for_time_context( &mut self, ) -> AnimationBuilder<'_, TimeCtx> where @@ -66,14 +66,14 @@ impl AnimationBuilderExt for EntityCommands<'_> { /// Use this entity as the animator. /// Tweens will be spawned as children of this entity. fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_timestep() + self.animation_for_time_context() } } impl AnimationBuilderExtGeneric for Commands<'_, '_> { /// Construct [`AnimationBuilder`] from [`Commands`]. /// This will automatically spawn an entity as the animator. - fn animation_for_timestep( + fn animation_for_time_context( &mut self, ) -> AnimationBuilder<'_, TimeCtx> where @@ -86,14 +86,14 @@ impl AnimationBuilderExt for Commands<'_, '_> { /// Construct [`AnimationBuilder`] from [`Commands`]. /// This will automatically spawn an entity as the animator. fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_timestep() + self.animation_for_time_context() } } impl AnimationBuilderExtGeneric for ChildSpawnerCommands<'_> { /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. /// This will automatically spawn a child entity as the animator. - fn animation_for_timestep( + fn animation_for_time_context( &mut self, ) -> AnimationBuilder<'_, TimeCtx> where @@ -106,7 +106,7 @@ impl AnimationBuilderExt for ChildSpawnerCommands<'_> { /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. /// This will automatically spawn a child entity as the animator. fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_timestep() + self.animation_for_time_context() } } From 31a9546fe54041dc697569873145a1d0504677e7 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 7 Feb 2026 09:33:28 +0200 Subject: [PATCH 13/68] rename time step related names to time context --- CHANGELOG.md | 2 +- src/combinator.rs | 16 ++++++++-------- src/interpolation.rs | 10 +++++----- src/interpolation/bevy_lookup_curve.rs | 6 +++--- src/lib.rs | 6 +++--- src/tween_event.rs | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3b3927..0ff750c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Breaking: - Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) - Add the ability to register systems for different schedules other than the default one (important if you want the animators from the bullet above to update the interpolation values at the right time) - - To do that (see `time_steps.rs` example): + - To do that (see `time_context_animation.rs` example): - do not register `DefaultTweenPlugins` - register `TweenScheduleIndependentPlugins` - register `TweenSchedulesDependentPlugins { schedules: [your_schedules_here] }` diff --git a/src/combinator.rs b/src/combinator.rs index 5e275c8..72a76ba 100644 --- a/src/combinator.rs +++ b/src/combinator.rs @@ -117,7 +117,7 @@ where { entity_commands: EntityCommands<'a>, time_runner: Option, - time_step_marker: Option>, + time_context_marker: Option>, custom_length: Option, skipped: bool, } @@ -132,7 +132,7 @@ where AnimationBuilder { entity_commands, time_runner: None, - time_step_marker: None, + time_context_marker: None, custom_length: None, skipped: false, } @@ -238,7 +238,7 @@ where let AnimationBuilder { mut entity_commands, time_runner, - time_step_marker, + time_context_marker, custom_length, skipped, } = self; @@ -257,7 +257,7 @@ where } } entity_commands - .insert((time_runner, time_step_marker.unwrap_or_default())); + .insert((time_runner, time_context_marker.unwrap_or_default())); if skipped { entity_commands.insert(SkipTimeRunner); } @@ -281,7 +281,7 @@ where let AnimationBuilder { mut entity_commands, time_runner, - time_step_marker, + time_context_marker, custom_length, skipped, } = self; @@ -300,7 +300,7 @@ where interpolation, tweens, time_runner, - time_step_marker.unwrap_or_default(), + time_context_marker.unwrap_or_default(), )); if skipped { entity_commands.insert(SkipTimeRunner); @@ -330,7 +330,7 @@ where let AnimationBuilder { mut entity_commands, time_runner, - time_step_marker, + time_context_marker, custom_length, skipped, } = self; @@ -349,7 +349,7 @@ where interpolation, tweens, time_runner, - time_step_marker.unwrap_or_default(), + time_context_marker.unwrap_or_default(), )); if skipped { entity_commands.try_insert(SkipTimeRunner); diff --git a/src/interpolation.rs b/src/interpolation.rs index 39f0268..443e559 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -71,8 +71,8 @@ where { /// The systems' schedules pub schedule: InternedScheduleLabel, - /// time step marker - time_step_marker: PhantomData, + /// time context marker + time_context_marker: PhantomData, } impl EaseKindSystemRegistrationPlugin where @@ -82,7 +82,7 @@ where pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - time_step_marker: PhantomData::default(), + time_context_marker: PhantomData::default(), } } } @@ -458,8 +458,8 @@ pub struct EaseClosurePlugin where TimeCtx: Default + Send + Sync + 'static, { - /// time step marker - time_step_marker: PhantomData, + /// time context marker + time_context_marker: PhantomData, } impl Plugin for EaseClosurePlugin where diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index c6f6053..f167333 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -44,8 +44,8 @@ where { /// The systems' schedules pub schedule: InternedScheduleLabel, - /// time step marker - time_step_marker: PhantomData, + /// time context marker + time_context_marker: PhantomData, } impl BevyLookupCurveInterpolationForSchedulePlugin where @@ -55,7 +55,7 @@ where pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - time_step_marker: PhantomData::default(), + time_context_marker: PhantomData::default(), } } } diff --git a/src/lib.rs b/src/lib.rs index 42dc346..7f7e3db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -486,9 +486,9 @@ pub struct TweenScheduleAndStepDependentPlugins where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule in which the time-step based systems would be executed + /// The schedule in which the time-context based systems would be executed pub schedule: InternedScheduleLabel, - time_step_marker: PhantomData, + time_context_marker: PhantomData, } impl TweenScheduleAndStepDependentPlugins where @@ -498,7 +498,7 @@ where pub fn for_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - time_step_marker: PhantomData::default(), + time_context_marker: PhantomData::default(), } } } diff --git a/src/tween_event.rs b/src/tween_event.rs index 44d3b5b..1124c5a 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -70,7 +70,7 @@ where /// The systems schedule pub schedule: InternedScheduleLabel, data_marker: PhantomData, - time_step_marker: PhantomData, + time_context_marker: PhantomData, } impl TweenEventOnSchedulePlugin where @@ -82,7 +82,7 @@ where Self { schedule, data_marker: PhantomData::default(), - time_step_marker: PhantomData::default(), + time_context_marker: PhantomData::default(), } } } From 6212e689f0fd3c5d58db3a467fb6513ff66d40a2 Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 11 Feb 2026 21:52:23 +0700 Subject: [PATCH 14/68] Make Helix ignores /image directory --- .helix/ignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .helix/ignore diff --git a/.helix/ignore b/.helix/ignore new file mode 100644 index 0000000..187d362 --- /dev/null +++ b/.helix/ignore @@ -0,0 +1 @@ +/images From ee7faa9e54260e1529b391df3aa765b4244528d6 Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 11 Feb 2026 21:55:26 +0700 Subject: [PATCH 15/68] Rename `TweenAppResource::default_schedule` back to `schedule` This prevents unnecessary breaking changes. --- src/interpolate.rs | 4 ++-- src/interpolation.rs | 4 ++-- src/interpolation/bevy_lookup_curve.rs | 2 +- src/lib.rs | 11 ++++------- src/tween_event.rs | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index e4bf40d..fc7e35c 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -233,7 +233,7 @@ impl Plugin for DefaultInterpolatorsPlugin { app.add_plugins(( DefaultInterpolatorsTypeRegistrationPlugin, DefaultInterpolatorsSystemRegistrationPlugin { - schedules: vec![app_resource.default_schedule], + schedules: vec![app_resource.schedule], }, )); } @@ -324,7 +324,7 @@ impl Plugin for DefaultDynInterpolatorsPlugin { .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); app.add_plugins(DefaultDynInterpolatorsSystemRegistrationPlugin { - schedules: vec![app_resource.default_schedule], + schedules: vec![app_resource.schedule], }); } } diff --git a/src/interpolation.rs b/src/interpolation.rs index 443e559..6e8f977 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -50,7 +50,7 @@ impl Plugin for EaseKindPlugin { app.add_plugins(( EaseKindTypeRegistrationPlugin, EaseKindSystemRegistrationPlugin::<()>::on_schedule( - app_resource.default_schedule, + app_resource.schedule, ), )); } @@ -476,7 +476,7 @@ where .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); app.add_systems( - app_resource.default_schedule, + app_resource.schedule, sample_interpolations_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), ); diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index f167333..14dacb9 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -31,7 +31,7 @@ impl Plugin for BevyLookupCurveInterpolationPlugin { .expect("`TweenAppResource` to be inserted to world"); app.add_plugins( BevyLookupCurveInterpolationForSchedulePlugin::<()>::on_schedule( - app_resource.default_schedule, + app_resource.schedule, ), ); } diff --git a/src/lib.rs b/src/lib.rs index 7f7e3db..e4b32bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -529,13 +529,13 @@ where #[derive(Resource, Clone)] pub struct TweenAppResource { /// Configured schedule for tween systems. - pub default_schedule: InternedScheduleLabel, + pub schedule: InternedScheduleLabel, } impl Default for TweenAppResource { fn default() -> Self { TweenAppResource { - default_schedule: PostUpdate.intern(), + schedule: PostUpdate.intern(), } } } @@ -568,7 +568,7 @@ impl Plugin for TweenCorePlugin { fn build(&self, app: &mut App) { if !app.is_plugin_added::() { app.add_plugins(bevy_time_runner::TimeRunnerPlugin { - schedule: self.app_resource.default_schedule, + schedule: self.app_resource.schedule, enable_debug: self.enable_time_runner_debug, }); } @@ -650,10 +650,7 @@ impl BevyTweenRegisterSystems for App { .world() .get_resource::() .expect("`TweenAppResource` to be is inserted to world"); - self.add_tween_systems_to_schedule( - app_resource.default_schedule, - tween_systems, - ) + self.add_tween_systems_to_schedule(app_resource.schedule, tween_systems) } } diff --git a/src/tween_event.rs b/src/tween_event.rs index 1124c5a..800dabc 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -56,7 +56,7 @@ where .get_resource::() .expect("`TweenAppResource` resource doesn't exist"); app.add_plugins(TweenEventOnSchedulePlugin::::for_schedule( - app_resource.default_schedule, + app_resource.schedule, )); } } From 01bc19867b84d05b8f382b0568eb8be095cf85cc Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 11 Feb 2026 21:59:50 +0700 Subject: [PATCH 16/68] Deprecate TweenAppResource --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e4b32bf..cde68cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -527,11 +527,17 @@ where /// This resource will be used while initializing tween plugin and systems. /// [`BevyTweenRegisterSystems`] for example. #[derive(Resource, Clone)] +#[deprecated( + // TODO: since = "...", + note = "This resource became less practical after generic_time_context (#78) PR" +)] +#[doc(hidden)] pub struct TweenAppResource { /// Configured schedule for tween systems. pub schedule: InternedScheduleLabel, } +#[allow(deprecated)] impl Default for TweenAppResource { fn default() -> Self { TweenAppResource { From da69899874c5036c17e2d58e96b64bc14c67bad1 Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 11 Feb 2026 22:10:50 +0700 Subject: [PATCH 17/68] [!Breaking] Update and simplify EaseKindPlugin (Breaking) Add `schedule` field to `EaseKindPlugin`. Add `TimeCtx` generic to `EaseKindPlugin` with default to () Add `in_schedule` method to `EaseKindPlugin`. implement `Default` for `EaseClosurePlugin<()>` Update plugin to follow `TweenAppResource` deprecation while remaining backward-compatible. `EaseKindTypeRegistrationPlugin` and `EaseKindSystemRegistrationPlugin` is removed. --- src/interpolation.rs | 72 ++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/src/interpolation.rs b/src/interpolation.rs index 6e8f977..bbb859b 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -14,9 +14,8 @@ use bevy::prelude::*; use bevy_time_runner::TimeContext; use std::marker::PhantomData; -use crate::{ - InternedScheduleLabel, TweenSystemSet, tween::TweenInterpolationValue, -}; +use crate::{TweenSystemSet, tween::TweenInterpolationValue}; +use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; use bevy_time_runner::TimeSpanProgress; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -35,70 +34,57 @@ pub trait Interpolation { } /// Plugin for [`EaseKind`] -pub struct EaseKindPlugin; -impl Plugin for EaseKindPlugin { - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - /// - /// [`TweenAppResource`]: crate::TweenAppResource - fn build(&self, app: &mut App) { - let app_resource = app - .world() - .get_resource::() - .expect("`TweenAppResource` to be is inserted to world"); - app.add_plugins(( - EaseKindTypeRegistrationPlugin, - EaseKindSystemRegistrationPlugin::<()>::on_schedule( - app_resource.schedule, - ), - )); - } -} - -/// Plugin for [`EaseKind`] type registration -pub struct EaseKindTypeRegistrationPlugin; -impl Plugin for EaseKindTypeRegistrationPlugin { - fn build(&self, app: &mut App) { - app.register_type::(); - } -} - -/// Plugin for [`EaseKind`] system registration -pub struct EaseKindSystemRegistrationPlugin +pub struct EaseKindPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The systems' schedules + /// The schedule the systems should run on. pub schedule: InternedScheduleLabel, - /// time context marker - time_context_marker: PhantomData, + marker: PhantomData, } -impl EaseKindSystemRegistrationPlugin + +impl EaseKindPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Constructor for that schedule - pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { + /// Initialize this plugin's system in this schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - time_context_marker: PhantomData::default(), + marker: PhantomData::default(), } } } -impl Plugin for EaseKindSystemRegistrationPlugin + +impl Plugin for EaseKindPlugin where TimeCtx: Default + Send + Sync + 'static, { fn build(&self, app: &mut App) { + #[allow(deprecated)] + let schedule = app + .world() + .get_resource::() + .map(|a| a.schedule) + .unwrap_or(self.schedule); + app.register_type::(); app.add_systems( - self.schedule.clone(), + schedule, sample_interpolations_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), ); } } +impl Default for EaseKindPlugin<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), + } + } +} + /// Curve functions over the [unit interval], commonly used for easing transitions. /// /// # Note From 11482dc8fc17e0b34881bc73921f2e44b72baa95 Mon Sep 17 00:00:00 2001 From: Multirious Date: Wed, 11 Feb 2026 22:24:21 +0700 Subject: [PATCH 18/68] [!Breaking] Update EaseClosurePlugin Add `TimeCtx` generic with default to `()` (Breaking) Add public `schedule` field. Add `in_schedule` method Rename `time_context_marker` to `marker` implement `Default` for `EaseClosurePlugin<()>` where schedule is `PostUpdate` Update plugin to follow `TweenAppResource` deprecation while remaining backward-compatible. --- src/interpolation.rs | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/src/interpolation.rs b/src/interpolation.rs index bbb859b..76f5a0a 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -439,36 +439,56 @@ impl From for EaseKind { /// not with [`DefaultTweenPlugins`] to reduce unused system. /// /// [`DefaultTweenPlugins`]: crate::DefaultTweenPlugins -#[derive(Default)] -pub struct EaseClosurePlugin +pub struct EaseClosurePlugin where TimeCtx: Default + Send + Sync + 'static, { - /// time context marker - time_context_marker: PhantomData, + /// The schedule the systems should run on. + pub schedule: InternedScheduleLabel, + marker: PhantomData, } + +impl EaseClosurePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Initialize this plugin's system on this schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + marker: PhantomData::default(), + } + } +} + impl Plugin for EaseClosurePlugin where TimeCtx: Default + Send + Sync + 'static, { - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - /// - /// [`TweenAppResource`]: crate::TweenAppResource fn build(&self, app: &mut App) { - let app_resource = app + #[allow(deprecated)] + let schedule = app .world() .get_resource::() - .expect("`TweenAppResource` to be is inserted to world"); + .map(|a| a.schedule) + .unwrap_or(self.schedule); app.add_systems( - app_resource.schedule, + schedule, sample_interpolations_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), ); } } +impl Default for EaseClosurePlugin<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), + } + } +} + /// Use a custom easing function via a closure. /// /// See [`EaseKind`]. From 924df90365c95fbba5eef43b691b18e982992319 Mon Sep 17 00:00:00 2001 From: Multirious Date: Fri, 13 Feb 2026 17:18:20 +0700 Subject: [PATCH 19/68] [!Breaking] Update asset tween systems Add `TimeCtx` generic to `apply_asset_tween_system` Update `apply_asset_tween_system`'s query to filter for only tween with `TimeContext` Add `TimeCtx` generic to `asset_dyn_tween_system` Add `TimeCtx` generic to `asset_tween_system` --- src/tween/systems.rs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 35277b3..6126e88 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -1,9 +1,7 @@ use super::*; -use bevy::{ - ecs::{ - component::Mutable, query::QueryEntityError, schedule::ScheduleConfigs, - system::ScheduleSystem, - } +use bevy::ecs::{ + component::Mutable, query::QueryEntityError, schedule::ScheduleConfigs, + system::ScheduleSystem, }; use bevy::platform::collections::{HashMap, HashSet}; use std::any::type_name; @@ -353,12 +351,13 @@ where /// Alias for [`apply_asset_tween_system`] and may contains more systems /// in the future. #[cfg(feature = "bevy_asset")] -pub fn asset_tween_system() -> ScheduleConfigs +pub fn asset_tween_system() -> ScheduleConfigs where I: Interpolator + Send + Sync + 'static, I::Item: Asset, + TimeCtx: Default + Send + Sync + 'static, { - apply_asset_tween_system::.into_configs() + apply_asset_tween_system::.into_configs() } /// Apply any [`Tween`] with the [`Interpolator`] that [`TargetAsset`] with @@ -410,10 +409,14 @@ where /// ``` #[cfg(feature = "bevy_asset")] #[allow(clippy::type_complexity)] -pub fn apply_asset_tween_system( +pub fn apply_asset_tween_system( mut q_tween: Query< - (&Tween, I>, &TweenInterpolationValue, &mut TweenPreviousValue), - Without, + ( + &Tween, I>, + &TweenInterpolationValue, + &mut TweenPreviousValue, + ), + (Without, With>), >, asset: Option>>, mut last_resource_error: Local, @@ -421,6 +424,7 @@ pub fn apply_asset_tween_system( ) where I: Interpolator, I::Item: Asset, + TimeCtx: Default + Send + Sync + 'static, { let mut asset_error = HashSet::default(); @@ -486,9 +490,11 @@ pub fn apply_asset_tween_system( /// This currently exists for backward compatibility and there's not really any big reason to deprecate it just yet. /// You might want to use `asset_tween_system::>()` for consistency #[cfg(feature = "bevy_asset")] -pub fn asset_dyn_tween_system() -> ScheduleConfigs +pub fn asset_dyn_tween_system() -> ScheduleConfigs where A: Asset, + TimeCtx: Default + Send + Sync + 'static, { - apply_asset_tween_system::>>.into_configs() + apply_asset_tween_system::>, TimeCtx> + .into_configs() } From b72548365092c741f64f51584d21863d2679dc36 Mon Sep 17 00:00:00 2001 From: Multirious Date: Fri, 13 Feb 2026 17:24:50 +0700 Subject: [PATCH 20/68] [!Breaking] Update component tween systems Add `TimeCtx` generic to `apply_component_tween_system` Update `apply_component_tween_system`'s query to filter for only tween with `TimeContext` Add `TimeCtx` generic to `component_dyn_tween_system` Add `TimeCtx` generic to `component_tween_system` --- src/tween/systems.rs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 6126e88..1960398 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -9,12 +9,13 @@ use tracing::error; /// Alias for [`apply_component_tween_system`] and may contains more systems /// in the future. -pub fn component_tween_system() -> ScheduleConfigs +pub fn component_tween_system() -> ScheduleConfigs where I: Interpolator + Send + Sync + 'static, I::Item: Component, + TimeCtx: Default + Send + Sync + 'static, { - apply_component_tween_system::.into_configs() + apply_component_tween_system::.into_configs() } /// [`QueryEntityError`] but implemented hash [`Hash`] @@ -115,11 +116,16 @@ impl core::fmt::Display for QueryEntityErrorWithoutWorld { /// } /// ``` #[allow(clippy::type_complexity)] -pub fn apply_component_tween_system( +pub fn apply_component_tween_system( q_animation_target: Query<(Option<&ChildOf>, Has)>, mut q_tween: Query< - (Entity, &Tween, &TweenInterpolationValue, &mut TweenPreviousValue), - Without, + ( + Entity, + &Tween, + &TweenInterpolationValue, + &mut TweenPreviousValue, + ), + (Without, With>), >, mut q_component: Query<&mut I::Item>, mut last_entity_error: Local>, @@ -127,6 +133,7 @@ pub fn apply_component_tween_system( ) where I: Interpolator + Send + Sync + 'static, I::Item: Component, + TimeCtx: Default + Send + Sync + 'static, { let mut entity_error = HashMap::default(); let mut search_error = HashSet::default(); @@ -240,11 +247,13 @@ pub fn apply_component_tween_system( /// /// This currently exists for backward compatibility and there's not really any big reason to deprecate it just yet. /// You might want to use `component_tween_system::>()` for consistency -pub fn component_dyn_tween_system() -> ScheduleConfigs +pub fn component_dyn_tween_system() +-> ScheduleConfigs where C: Component, + TimeCtx: Default + Send + Sync + 'static, { - apply_component_tween_system::>> + apply_component_tween_system::>, TimeCtx> .into_configs() } From 4ee3a1a6fb3500bb87ac6234a5e92173bf7d9ee9 Mon Sep 17 00:00:00 2001 From: Multirious Date: Fri, 13 Feb 2026 17:27:46 +0700 Subject: [PATCH 21/68] [!Breaking] Update resource tween systems Add `TimeCtx` generic to `apply_resource_tween_system` Update `apply_resource_tween_system`'s query to filter for only tween with `TimeContext` Add `TimeCtx` generic to `resource_dyn_tween_system` Add `TimeCtx` generic to `resource_tween_system` --- src/tween/systems.rs | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 1960398..cfa8b8d 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -259,12 +259,13 @@ where /// Alias for [`apply_resource_tween_system`] and may contains more systems /// in the future. -pub fn resource_tween_system() -> ScheduleConfigs +pub fn resource_tween_system() -> ScheduleConfigs where I: Interpolator + Send + Sync + 'static, I::Item: Resource, + TimeCtx: Default + Send + Sync + 'static, { - apply_resource_tween_system::.into_configs() + apply_resource_tween_system::.into_configs() } /// Apply any [`Tween`] with the [`Interpolator`] that [`TargetResource`] with @@ -317,16 +318,21 @@ where /// } /// ``` #[allow(clippy::type_complexity)] -pub fn apply_resource_tween_system( +pub fn apply_resource_tween_system( mut q_tween: Query< - (&Tween, &TweenInterpolationValue, &mut TweenPreviousValue), - Without, + ( + &Tween, + &TweenInterpolationValue, + &mut TweenPreviousValue, + ), + (Without, With>), >, resource: Option>, mut last_error: Local, ) where I: Interpolator, I::Item: Resource, + TimeCtx: Default + Send + Sync + 'static, { let Some(mut resource) = resource else { if !*last_error { @@ -339,21 +345,28 @@ pub fn apply_resource_tween_system( return; }; *last_error = false; - q_tween.iter_mut().for_each(|(tween, ease_value, mut previous_value)| { - tween.interpolator.interpolate(&mut resource, ease_value.0, previous_value.0); - previous_value.0 = ease_value.0; - }) + q_tween + .iter_mut() + .for_each(|(tween, ease_value, mut previous_value)| { + tween.interpolator.interpolate( + &mut resource, + ease_value.0, + previous_value.0, + ); + previous_value.0 = ease_value.0; + }) } /// System alias for [`apply_resource_tween_system`] that uses boxed dynamic [`Interpolator`]. (`Box>()` for consistency -pub fn resource_dyn_tween_system() -> ScheduleConfigs +pub fn resource_dyn_tween_system() -> ScheduleConfigs where R: Resource, + TimeCtx: Default + Send + Sync + 'static, { - apply_resource_tween_system::>> + apply_resource_tween_system::>, TimeCtx> .into_configs() } From 1723eabef6f13bdbf6a3484d6dff10f9bc2447c6 Mon Sep 17 00:00:00 2001 From: Multirious Date: Fri, 13 Feb 2026 17:03:54 +0700 Subject: [PATCH 22/68] [!Breaking] Update and simplify DefaultInterpolatorsPlugin Add `TimeCtx` generic with default to `()` (Breaking) Add public `schedule` field and private `marker` field. Add `in_schedule` method implement `Default` for `DefaultInterpolatorsPlugin<()>` where schedule is `PostUpdate` Update plugin to follow TweenAppResource deprecation while remaining backward-compatible. Update systems to use `TimeCtx` Remove `DefaultInterpolatorsSystemRegistrationPlugin` Remove `DefaultInterpolatorsTypeRegistrationPlugin` --- src/interpolate.rs | 134 ++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 62 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index fc7e35c..95de34c 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -76,6 +76,8 @@ mod transform; #[cfg(feature = "bevy_ui")] mod ui; +use std::marker::PhantomData; + pub use transform::*; #[cfg(feature = "bevy_sprite")] @@ -84,10 +86,11 @@ pub use sprite::*; #[cfg(feature = "bevy_ui")] pub use ui::*; -use crate::{ - BevyTweenRegisterSystemsToSchedule, InternedScheduleLabel, - TweenAppResource, tween, -}; +#[allow(deprecated)] +use crate::TweenAppResource; +use crate::{BevyTweenRegisterSystemsToSchedule, tween}; +use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; + use bevy::prelude::*; /// Alias for an `Interpolator` as a boxed trait object. @@ -218,30 +221,19 @@ pub trait Interpolator: Send + Sync + 'static { /// - [`AngleZ`] /// - [`SpriteColor`] and [`ColorMaterial`] if `"bevy_sprite"` feature is enabled. /// - [`BackgroundColor`] and [`BorderColor`] if `"bevy_ui"` feature is enabled. -pub struct DefaultInterpolatorsPlugin; -impl Plugin for DefaultInterpolatorsPlugin { - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - /// - /// [`TweenAppResource`]: crate::TweenAppResource - fn build(&self, app: &mut App) { - let app_resource = app - .world() - .get_resource::() - .expect("`TweenAppResource` to be is inserted to world"); - app.add_plugins(( - DefaultInterpolatorsTypeRegistrationPlugin, - DefaultInterpolatorsSystemRegistrationPlugin { - schedules: vec![app_resource.schedule], - }, - )); - } +pub struct DefaultInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// The schedule the systems should run on. + pub schedule: InternedScheduleLabel, + marker: PhantomData, } -/// Register type for the default interpolators for a chosen schedule -pub struct DefaultInterpolatorsTypeRegistrationPlugin; -impl Plugin for DefaultInterpolatorsTypeRegistrationPlugin { +impl Plugin for DefaultInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ fn build(&self, app: &mut App) { app.register_type::>() .register_type::>() @@ -257,47 +249,65 @@ impl Plugin for DefaultInterpolatorsTypeRegistrationPlugin { #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] app.register_type::>(); + + #[allow(deprecated)] + let schedule = app + .world() + .get_resource::() + .map(|a| a.schedule) + .unwrap_or(self.schedule); + + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::(), + tween::component_tween_system::(), + tween::component_tween_system::(), + tween::component_tween_system::(), + ), + ); + + #[cfg(feature = "bevy_sprite")] + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::(), + ); + + #[cfg(feature = "bevy_ui")] + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::(), + tween::component_tween_system::(), + ), + ); + + #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] + app.add_tween_systems_to_schedule( + schedule, + tween::asset_tween_system::(), + ); } } -/// Register systems for the default interpolators for a chosen schedule -pub struct DefaultInterpolatorsSystemRegistrationPlugin { - /// The systems' schedules - pub schedules: Vec, +impl DefaultInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Initialize this plugin's system on this schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + marker: PhantomData::default(), + } + } } -impl Plugin for DefaultInterpolatorsSystemRegistrationPlugin { - fn build(&self, app: &mut App) { - for schedule in self.schedules.clone() { - app.add_tween_systems_to_schedule( - schedule, - ( - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), - ), - ); - #[cfg(feature = "bevy_sprite")] - app.add_tween_systems_to_schedule( - schedule, - tween::component_tween_system::(), - ); - - #[cfg(feature = "bevy_ui")] - app.add_tween_systems_to_schedule( - schedule, - ( - tween::component_tween_system::(), - tween::component_tween_system::(), - ), - ); - - #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] - app.add_tween_systems_to_schedule( - schedule, - tween::asset_tween_system::(), - ); +impl Default for DefaultInterpolatorsPlugin<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), } } } From 5a31f42d0cd1956bd6598b96a5b03f2238e12a48 Mon Sep 17 00:00:00 2001 From: Multirious Date: Fri, 13 Feb 2026 17:39:21 +0700 Subject: [PATCH 23/68] [!Breaking] Update and simplify DefaultDynInterpolatorsPlugin Add `TimeCtx` generic with default to `()` (Breaking) Add public `schedule` field and private `marker` field. Add `in_schedule` method implement `Default` for `DefaultDynInterpolatorsPlugin<()>` where schedule is `PostUpdate` Update plugin to follow TweenAppResource deprecation while remaining backward-compatible. Update systems to use `TimeCtx` Remove `DefaultDynInterpolatorsSystemRegistrationPlugin` --- src/interpolate.rs | 121 +++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 54 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 95de34c..e13e1b7 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -86,8 +86,6 @@ pub use sprite::*; #[cfg(feature = "bevy_ui")] pub use ui::*; -#[allow(deprecated)] -use crate::TweenAppResource; use crate::{BevyTweenRegisterSystemsToSchedule, tween}; use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; @@ -321,62 +319,77 @@ impl Default for DefaultInterpolatorsPlugin<()> { /// - [`BackgroundColor`] and [`BorderColor`] components if `"bevy_ui"` feature is enabled. /// /// [`ColorMaterial`]: bevy::sprite_render::ColorMaterial -pub struct DefaultDynInterpolatorsPlugin; -impl Plugin for DefaultDynInterpolatorsPlugin { - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - /// - /// [`TweenAppResource`]: crate::TweenAppResource +pub struct DefaultDynInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// The schedule the systems should run on. + pub schedule: InternedScheduleLabel, + marker: PhantomData, +} + +impl Plugin for DefaultDynInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ fn build(&self, app: &mut App) { - let app_resource = app + #[allow(deprecated)] + let schedule = app .world() - .get_resource::() - .expect("`TweenAppResource` to be is inserted to world"); - app.add_plugins(DefaultDynInterpolatorsSystemRegistrationPlugin { - schedules: vec![app_resource.schedule], - }); + .get_resource::() + .map(|a| a.schedule) + .unwrap_or(self.schedule); + + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::< + BoxedInterpolator, + TimeCtx, + >(), + ); + + #[cfg(feature = "bevy_sprite")] + app.add_tween_systems_to_schedule( + schedule, + tween::component_tween_system::, TimeCtx>( + ), + ); + + #[cfg(feature = "bevy_ui")] + app.add_tween_systems_to_schedule( + schedule, + ( + tween::component_tween_system::< + BoxedInterpolator, + TimeCtx, + >(), + tween::component_tween_system::< + BoxedInterpolator, + TimeCtx, + >(), + ), + ); + + #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset"))] + app.add_tween_systems_to_schedule( + schedule, + tween::asset_tween_system::< + BoxedInterpolator, + TimeCtx, + >(), + ); } } -/// Register type and systems for the dynamic default interpolators for a chosen schedule -pub struct DefaultDynInterpolatorsSystemRegistrationPlugin { - /// The systems' schedules - pub schedules: Vec, -} -impl Plugin for DefaultDynInterpolatorsSystemRegistrationPlugin { - fn build(&self, app: &mut App) { - for schedule in self.schedules.clone() { - app.add_tween_systems_to_schedule( - schedule, - tween::component_tween_system::>(), - ); - - #[cfg(feature = "bevy_sprite")] - app.add_tween_systems_to_schedule( - schedule, - tween::component_tween_system::>(), - ); - - #[cfg(feature = "bevy_ui")] - app.add_tween_systems_to_schedule( - schedule, - ( - tween::component_tween_system::< - BoxedInterpolator, - >(), - tween::component_tween_system::< - BoxedInterpolator, - >(), - ), - ); - - #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset"))] - app.add_tween_systems_to_schedule( - schedule, - tween::asset_tween_system::< - BoxedInterpolator, - >(), - ); + +impl DefaultDynInterpolatorsPlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Initialize this plugin's system on this schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + marker: PhantomData::default(), } } } From 88e72d26ea7c251b6cf233804e0219152a694901 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 14:17:51 +0200 Subject: [PATCH 24/68] register plugins with TimeCtx instead of type registration ones --- src/lib.rs | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 698f651..664bbcb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -446,8 +446,6 @@ impl PluginGroup for TweenScheduleIndependentPlugins { let group = PluginGroupBuilder::start::() .add(TweenCorePlugin::default()) - .add(interpolate::DefaultInterpolatorsTypeRegistrationPlugin) - .add(interpolation::EaseKindTypeRegistrationPlugin) .add_group(tween_event::DefaultTweenEventPlugins); group } @@ -461,20 +459,11 @@ pub struct TweenSchedulesDependentPlugins { impl PluginGroup for TweenSchedulesDependentPlugins { fn build(self) -> bevy::app::PluginGroupBuilder { let group = - PluginGroupBuilder::start::() - .add( - interpolate::DefaultInterpolatorsSystemRegistrationPlugin { - schedules: self.schedules.clone(), - }, - ) - .add( - interpolate::DefaultDynInterpolatorsSystemRegistrationPlugin { - schedules: self.schedules.clone(), - }, - ) - .add(SystemSetsRegistraitonPlugin { + PluginGroupBuilder::start::().add( + SystemSetsRegistraitonPlugin { schedules: self.schedules.clone(), - }); + }, + ); group } } @@ -509,9 +498,17 @@ where { fn build(&self, app: &mut App) { #[allow(clippy::let_and_return)] - app.add_plugins(interpolation::EaseKindSystemRegistrationPlugin::< - TimeCtx, - >::on_schedule(self.schedule.clone())); + app.add_plugins(( + interpolation::EaseKindPlugin::::in_schedule( + self.schedule.clone(), + ), + interpolate::DefaultInterpolatorsPlugin::::in_schedule( + self.schedule.clone(), + ), + interpolate::DefaultDynInterpolatorsPlugin::::in_schedule( + self.schedule.clone(), + ), + )); #[cfg(feature = "bevy_lookup_curve")] app.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::on_schedule(self.schedule.clone())); if !app.is_plugin_added::>() { From 66cd36d40e035b8533bcb92bcbc0a5d237712c93 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 15:01:25 +0200 Subject: [PATCH 25/68] [Breaking!] Update and simplify TweenEventPlugin * it now takes TimeCtx generic with default of () * for_schedule constructor has been renamed to in_schedule * DefaultTweenEventPlugins now takes schedule as well, to register the default tween event plugins --- src/tween_event.rs | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/src/tween_event.rs b/src/tween_event.rs index 800dabc..fc87c90 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -37,32 +37,8 @@ use crate::{ tween::{SkipTween, TweenInterpolationValue}, }; -/// Plugin for simple generic event that fires at a specific time span. -#[derive(Default)] -pub struct TweenEventPlugin -where - Data: Send + Sync + 'static + Clone, -{ - marker: PhantomData, -} - -impl Plugin for TweenEventPlugin -where - Data: Send + Sync + 'static + Clone, -{ - fn build(&self, app: &mut App) { - let app_resource = app - .world() - .get_resource::() - .expect("`TweenAppResource` resource doesn't exist"); - app.add_plugins(TweenEventOnSchedulePlugin::::for_schedule( - app_resource.schedule, - )); - } -} - /// A plugin for registering the tween event system for tween of type Data for the specified schedule -pub struct TweenEventOnSchedulePlugin +pub struct TweenEventPlugin where Data: Send + Sync + 'static + Clone, TimeCtx: Default + Send + Sync + 'static, @@ -72,13 +48,13 @@ where data_marker: PhantomData, time_context_marker: PhantomData, } -impl TweenEventOnSchedulePlugin +impl TweenEventPlugin where Data: Send + Sync + 'static + Clone, TimeCtx: Default + Send + Sync + 'static, { /// Constructor for schedule - pub fn for_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, data_marker: PhantomData::default(), @@ -86,7 +62,7 @@ where } } } -impl Plugin for TweenEventOnSchedulePlugin +impl Plugin for TweenEventPlugin where Data: Send + Sync + 'static + Clone, TimeCtx: Default + Send + Sync + 'static, @@ -104,15 +80,17 @@ where /// Default tween event plugins: /// - `TweenEventPlugin::<()>::default()`, /// - `TweenEventPlugin::<&'static str>::default()` -pub struct DefaultTweenEventPlugins; +pub struct DefaultTweenEventPlugins { + pub schedule: InternedScheduleLabel, +} impl PluginGroup for DefaultTweenEventPlugins { #[allow(unused)] #[allow(clippy::let_and_return)] fn build(self) -> PluginGroupBuilder { PluginGroupBuilder::start::() - .add(TweenEventPlugin::<()>::default()) - .add(TweenEventPlugin::<&'static str>::default()) + .add(TweenEventPlugin::<()>::in_schedule(self.schedule)) + .add(TweenEventPlugin::<&'static str>::in_schedule(self.schedule)) } } From b58f005b8d05505e449331f3208b8649f1a670ec Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 15:03:19 +0200 Subject: [PATCH 26/68] [Breaking!] Update and simplify BevyLookupCurveInterpolationPlugin * it now takes TimeCtx generic with default of () * on_schedule constructor has been renamed to in_schedule --- src/interpolation/bevy_lookup_curve.rs | 30 ++++---------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 14dacb9..e5f5efc 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -15,30 +15,8 @@ use ::bevy_lookup_curve::{LookupCache, LookupCurve}; use bevy::platform::collections::HashSet; use tracing::error; -/// Use [`bevy_lookup_curve`](::bevy_lookup_curve) for interpolation. -pub struct BevyLookupCurveInterpolationPlugin; - -impl Plugin for BevyLookupCurveInterpolationPlugin { - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - /// - /// [`TweenAppResource`]: crate::TweenAppResource - fn build(&self, app: &mut App) { - let app_resource = app - .world() - .get_resource::() - .expect("`TweenAppResource` to be inserted to world"); - app.add_plugins( - BevyLookupCurveInterpolationForSchedulePlugin::<()>::on_schedule( - app_resource.schedule, - ), - ); - } -} - /// Use [`bevy_lookup_curve`](::bevy_lookup_curve) for interpolation on the specified schedule -pub struct BevyLookupCurveInterpolationForSchedulePlugin +pub struct BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { @@ -47,19 +25,19 @@ where /// time context marker time_context_marker: PhantomData, } -impl BevyLookupCurveInterpolationForSchedulePlugin +impl BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { /// Constructor for that schedule - pub fn on_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, time_context_marker: PhantomData::default(), } } } -impl Plugin for BevyLookupCurveInterpolationForSchedulePlugin +impl Plugin for BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { From 314967930602b28cd4e681f542dea252e63d78c6 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 15:15:20 +0200 Subject: [PATCH 27/68] [Breaking!] Simplify DefaultTweenPlugins * add default schedule and enable_debugging to DefaultTweenPlugins * remove TweenSchedulesDependentPlugins , system sets will now be registered in TweenScheduleAndStepDependentPlugins * register default tween event plugin on default schedule --- Cargo.lock | 2 +- src/lib.rs | 104 +++++++++++++++++---------------------------- src/tween_event.rs | 1 + 3 files changed, 42 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96f7164..5ee73af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1295,7 +1295,7 @@ dependencies = [ [[package]] name = "bevy_time_runner" version = "0.5.2" -source = "git+https://github.com/Multirious/bevy_time_runner?branch=main#e3f116bcc94478783457be2a2cfc11f87c2db3e9" +source = "git+https://github.com/multirious/bevy_time_runner?branch=main#e3f116bcc94478783457be2a2cfc11f87c2db3e9" dependencies = [ "bevy_app", "bevy_ecs", diff --git a/src/lib.rs b/src/lib.rs index 664bbcb..54fceb8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -422,49 +422,38 @@ pub use tween::resource_tween_system; pub use tween_event::tween_event_system; /// Default plugins for using crate. -pub struct DefaultTweenPlugins; +pub struct DefaultTweenPlugins { + /// The schedule to register all default systems in + schedule: InternedScheduleLabel, + /// Enable debug information and warnings. + /// + /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. + pub enable_debug: bool, +} impl PluginGroup for DefaultTweenPlugins { fn build(self) -> bevy::app::PluginGroupBuilder { let group = PluginGroupBuilder::start::() - .add_group(TweenScheduleIndependentPlugins) - .add_group(TweenSchedulesDependentPlugins { - schedules: vec![PostUpdate.intern()], + .add(TweenCorePlugin { + schedule: self.schedule.clone(), + enable_debug: self.enable_debug, + }) + .add_group(tween_event::DefaultTweenEventPlugins { + schedule: self.schedule.clone(), }) .add(TweenScheduleAndStepDependentPlugins::<()>::for_schedule( - PostUpdate.intern(), + self.schedule.clone(), )); group } } -/// Time-step and schedule agnostic logic. These should always be registered once and the same. -pub struct TweenScheduleIndependentPlugins; - -impl PluginGroup for TweenScheduleIndependentPlugins { - fn build(self) -> bevy::app::PluginGroupBuilder { - let group = - PluginGroupBuilder::start::() - .add(TweenCorePlugin::default()) - .add_group(tween_event::DefaultTweenEventPlugins); - group - } -} - -/// Schedule-specific logic that is time-step agnostic. Should be registered once with all the schedules. -pub struct TweenSchedulesDependentPlugins { - /// schedules in which the systems would run - pub schedules: Vec, -} -impl PluginGroup for TweenSchedulesDependentPlugins { - fn build(self) -> bevy::app::PluginGroupBuilder { - let group = - PluginGroupBuilder::start::().add( - SystemSetsRegistraitonPlugin { - schedules: self.schedules.clone(), - }, - ); - group +impl Default for DefaultTweenPlugins { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + enable_debug: true, + } } } @@ -508,6 +497,9 @@ where interpolate::DefaultDynInterpolatorsPlugin::::in_schedule( self.schedule.clone(), ), + SystemSetsRegistraitonPlugin { + schedule: self.schedule.clone(), + }, )); #[cfg(feature = "bevy_lookup_curve")] app.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::on_schedule(self.schedule.clone())); @@ -553,8 +545,8 @@ impl Default for TweenAppResource { /// [`UpdateInterpolationValue`]: [`TweenSystemSet::UpdateInterpolationValue`] /// [`ApplyTween`]: [`TweenSystemSet::ApplyTween`] pub struct TweenCorePlugin { - /// See [`TweenAppResource`] - pub app_resource: TweenAppResource, + /// The schedule to register the core time-runner plugin in + schedule: InternedScheduleLabel, /// Enable debug information and warnings. /// /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. @@ -565,49 +557,33 @@ impl Plugin for TweenCorePlugin { fn build(&self, app: &mut App) { if !app.is_plugin_added::() { app.add_plugins(bevy_time_runner::TimeRunnerPlugin { - schedule: self.app_resource.schedule, + schedule: self.schedule.clone(), enable_debug: self.enable_debug, }); } - app.insert_resource(self.app_resource.clone()) - .register_type::() + app.register_type::() .register_type::(); } - - fn cleanup(&self, app: &mut App) { - app.world_mut().remove_resource::(); - } } -impl Default for TweenCorePlugin { - fn default() -> Self { - Self { - app_resource: TweenAppResource::default(), - enable_debug: true, - } - } -} - -/// A plugin for registering the system sets in specific schedules +/// A plugin for registering the system sets in specific schedule struct SystemSetsRegistraitonPlugin { - /// The schedules to register the sets in - schedules: Vec, + /// The schedule to register the sets in + schedule: InternedScheduleLabel, } impl Plugin for SystemSetsRegistraitonPlugin { fn build(&self, app: &mut App) { - for schedule in self.schedules.clone() { - app.configure_sets( - schedule, - ( - TweenSystemSet::UpdateInterpolationValue, - TweenSystemSet::ApplyTween, - ) - .chain() - .after(bevy_time_runner::TimeRunnerSet::Progress), - ); - } + app.configure_sets( + self.schedule, + ( + TweenSystemSet::UpdateInterpolationValue, + TweenSystemSet::ApplyTween, + ) + .chain() + .after(bevy_time_runner::TimeRunnerSet::Progress), + ); } } diff --git a/src/tween_event.rs b/src/tween_event.rs index fc87c90..95597c9 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -81,6 +81,7 @@ where /// - `TweenEventPlugin::<()>::default()`, /// - `TweenEventPlugin::<&'static str>::default()` pub struct DefaultTweenEventPlugins { + /// Schedule to register default tweens in pub schedule: InternedScheduleLabel, } From 752af83b0742eb181525083e8697dfa9430403af Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:04:41 +0200 Subject: [PATCH 28/68] [Breaking!] force user to provide schedule on tween systems registration since the app resource is now deprecated --- src/interpolate.rs | 18 +++++++++--------- src/lib.rs | 37 ++++--------------------------------- 2 files changed, 13 insertions(+), 42 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index e13e1b7..1967d76 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -86,7 +86,7 @@ pub use sprite::*; #[cfg(feature = "bevy_ui")] pub use ui::*; -use crate::{BevyTweenRegisterSystemsToSchedule, tween}; +use crate::{BevyTweenRegisterSystems, tween}; use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; use bevy::prelude::*; @@ -255,7 +255,7 @@ where .map(|a| a.schedule) .unwrap_or(self.schedule); - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, ( tween::component_tween_system::(), @@ -266,13 +266,13 @@ where ); #[cfg(feature = "bevy_sprite")] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, tween::component_tween_system::(), ); #[cfg(feature = "bevy_ui")] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, ( tween::component_tween_system::(), @@ -281,7 +281,7 @@ where ); #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset",))] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, tween::asset_tween_system::(), ); @@ -340,7 +340,7 @@ where .map(|a| a.schedule) .unwrap_or(self.schedule); - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, tween::component_tween_system::< BoxedInterpolator, @@ -349,14 +349,14 @@ where ); #[cfg(feature = "bevy_sprite")] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, tween::component_tween_system::, TimeCtx>( ), ); #[cfg(feature = "bevy_ui")] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, ( tween::component_tween_system::< @@ -371,7 +371,7 @@ where ); #[cfg(all(feature = "bevy_sprite", feature = "bevy_asset"))] - app.add_tween_systems_to_schedule( + app.add_tween_systems( schedule, tween::asset_tween_system::< BoxedInterpolator, diff --git a/src/lib.rs b/src/lib.rs index 54fceb8..59ce0c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -607,50 +607,21 @@ pub enum TweenSystemSet { ApplyTween, } -/// Helper trait to add systems by this crate to your app and avoid mistake -/// from forgetting to use the intended schedule and set. -pub trait BevyTweenRegisterSystems { - /// Register tween systems - fn add_tween_systems( - &mut self, - tween_systems: impl IntoScheduleConfigs, - ) -> &mut Self; -} - -impl BevyTweenRegisterSystems for App { - /// Register tween systems in schedule configured in [`TweenAppResource`] - /// in set [`TweenSystemSet::ApplyTween`] - /// - /// # Panics - /// - /// Panics if [`TweenAppResource`] does not exist in world. - fn add_tween_systems( - &mut self, - tween_systems: impl IntoScheduleConfigs, - ) -> &mut Self { - let app_resource = self - .world() - .get_resource::() - .expect("`TweenAppResource` to be is inserted to world"); - self.add_tween_systems_to_schedule(app_resource.schedule, tween_systems) - } -} - /// Helper trait to add systems by this crate to your app /// for different schedules -pub trait BevyTweenRegisterSystemsToSchedule { +pub trait BevyTweenRegisterSystems { /// Register tween systems - fn add_tween_systems_to_schedule( + fn add_tween_systems( &mut self, schedule: InternedScheduleLabel, tween_systems: impl IntoScheduleConfigs, ) -> &mut Self; } -impl BevyTweenRegisterSystemsToSchedule for App { +impl BevyTweenRegisterSystems for App { /// Register tween systems in schedule /// in set [`TweenSystemSet::ApplyTween`] - fn add_tween_systems_to_schedule( + fn add_tween_systems( &mut self, schedule: InternedScheduleLabel, tween_systems: impl IntoScheduleConfigs, From 09911ce6c58857bb73f5a893a36a4c6c0e4d4f86 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:14:47 +0200 Subject: [PATCH 29/68] make DefaultTweenPlugins take TimeCtx * now there's only one main plugin * rename TweenScheduleAndStepDependentPlugins and make it private as there's now no need to register it from outside --- src/lib.rs | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 59ce0c3..fcb3bc6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -422,16 +422,24 @@ pub use tween::resource_tween_system; pub use tween_event::tween_event_system; /// Default plugins for using crate. -pub struct DefaultTweenPlugins { +pub struct DefaultTweenPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ /// The schedule to register all default systems in schedule: InternedScheduleLabel, /// Enable debug information and warnings. /// /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. pub enable_debug: bool, + /// A marker for the plugins time context + time_context_marker: PhantomData, } -impl PluginGroup for DefaultTweenPlugins { +impl PluginGroup for DefaultTweenPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ fn build(self) -> bevy::app::PluginGroupBuilder { let group = PluginGroupBuilder::start::() .add(TweenCorePlugin { @@ -441,39 +449,54 @@ impl PluginGroup for DefaultTweenPlugins { .add_group(tween_event::DefaultTweenEventPlugins { schedule: self.schedule.clone(), }) - .add(TweenScheduleAndStepDependentPlugins::<()>::for_schedule( + .add(TweenSystemsPlugins::::in_schedule( self.schedule.clone(), )); group } } -impl Default for DefaultTweenPlugins { +impl DefaultTweenPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + time_context_marker: PhantomData::default(), + schedule: schedule.clone(), + ..default() + } + } +} +impl Default for DefaultTweenPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ fn default() -> Self { Self { schedule: PostUpdate.intern(), enable_debug: true, + time_context_marker: PhantomData::default(), } } } -/// Schedule and time-step specific systems. -/// For example, if I want to add systems for Fixed time-step interpolation, -/// I should specify here the schedule in which they should run (In this case, probably FixedLast). -pub struct TweenScheduleAndStepDependentPlugins +/// Tween system and type registration +struct TweenSystemsPlugins where TimeCtx: Default + Send + Sync + 'static, { /// The schedule in which the time-context based systems would be executed - pub schedule: InternedScheduleLabel, + schedule: InternedScheduleLabel, time_context_marker: PhantomData, } -impl TweenScheduleAndStepDependentPlugins +impl TweenSystemsPlugins where TimeCtx: Default + Send + Sync + 'static, { /// Constructor for schedule - pub fn for_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, time_context_marker: PhantomData::default(), @@ -481,7 +504,7 @@ where } } -impl Plugin for TweenScheduleAndStepDependentPlugins +impl Plugin for TweenSystemsPlugins where TimeCtx: Default + Send + Sync + 'static, { From 20aff54ac69cfe66558e4bbd93e1ba6de4563e65 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sat, 21 Feb 2026 17:13:04 +0200 Subject: [PATCH 30/68] [!Breaking] update main plugins * Rename all phantom data fields to `marker` * Update bevy_time_runner plugins to one * Make TweenCorePlugin take TimeCtx generic as well * Merge TweenSystemsPlugins into DefaultTweenPlugins --- Cargo.lock | 490 +++++++++++++++++-------- src/interpolation/bevy_lookup_curve.rs | 6 +- src/lib.rs | 148 ++++---- src/tween_event.rs | 8 +- 4 files changed, 422 insertions(+), 230 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ee73af..7728d2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,7 +109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.10.0", + "bitflags 2.11.0", "cc", "cesu8", "jni", @@ -144,6 +144,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + [[package]] name = "approx" version = "0.5.1" @@ -237,9 +243,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.3" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" dependencies = [ "async-task", "concurrent-queue", @@ -429,7 +435,7 @@ dependencies = [ "bevy_reflect", "bevy_tasks", "bevy_utils", - "bitflags 2.10.0", + "bitflags 2.11.0", "blake3", "crossbeam-channel", "derive_more", @@ -527,7 +533,7 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.10.0", + "bitflags 2.11.0", "nonmax", "radsort", "smallvec", @@ -576,7 +582,7 @@ dependencies = [ "bevy_reflect", "bevy_tasks", "bevy_utils", - "bitflags 2.10.0", + "bitflags 2.11.0", "bumpalo", "concurrent-queue", "derive_more", @@ -605,9 +611,9 @@ dependencies = [ [[package]] name = "bevy_egui" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f67a59399c0e9cf009ea4ede92e43b413ffe3cfc465ff4dc2679ccad3bdf7e" +checksum = "8d0a7e4806f3f242326d2c6157531c36d710f3bf320ebc0a1678e44635ed0eac" dependencies = [ "arboard", "bevy_app", @@ -635,7 +641,7 @@ dependencies = [ "crossbeam-channel", "egui", "encase", - "getrandom", + "getrandom 0.3.4", "image", "itertools", "js-sys", @@ -725,7 +731,7 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_utils", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "futures-lite", "guillotiere", @@ -921,7 +927,7 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_transform", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "derive_more", "hexasphere", @@ -961,7 +967,7 @@ dependencies = [ "bevy_shader", "bevy_transform", "bevy_utils", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "derive_more", "fixedbitset", @@ -1015,7 +1021,7 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.10.0", + "bitflags 2.11.0", "nonmax", "radsort", "smallvec", @@ -1098,7 +1104,7 @@ dependencies = [ "bevy_transform", "bevy_utils", "bevy_window", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "derive_more", "downcast-rs", @@ -1198,7 +1204,7 @@ dependencies = [ "bevy_text", "bevy_transform", "bevy_utils", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "derive_more", "fixedbitset", @@ -1295,7 +1301,7 @@ dependencies = [ [[package]] name = "bevy_time_runner" version = "0.5.2" -source = "git+https://github.com/multirious/bevy_time_runner?branch=main#e3f116bcc94478783457be2a2cfc11f87c2db3e9" +source = "git+https://github.com/multirious/bevy_time_runner?branch=main#8949a9752052aad9cfa1e22027d17450d4d7f8cc" dependencies = [ "bevy_app", "bevy_ecs", @@ -1451,9 +1457,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" dependencies = [ "bytemuck", "serde_core", @@ -1523,15 +1529,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" dependencies = [ "bytemuck_derive", ] @@ -1561,9 +1567,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "calloop" @@ -1571,7 +1577,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "log", "polling", "rustix 0.38.44", @@ -1581,9 +1587,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.54" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ "find-msvc-tools", "jobserver", @@ -1760,7 +1766,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "core-foundation 0.10.1", "libc", ] @@ -1780,7 +1786,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cadaea21e24c49c0c82116f2b465ae6a49d63c90e428b0f8d9ae1f638ac91f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "fontdb", "harfrust", "linebender_resource_handle", @@ -1854,9 +1860,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "ctrlc" -version = "3.5.1" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ "dispatch2", "nix", @@ -1910,7 +1916,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.6.2", "libc", "objc2 0.6.3", @@ -1969,7 +1975,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a9b567d356674e9a5121ed3fedfb0a7c31e059fe71f6972b691bcd0bfc284e3" dependencies = [ "ahash", - "bitflags 2.10.0", + "bitflags 2.11.0", "emath", "epaint", "log", @@ -2149,9 +2155,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" @@ -2161,9 +2167,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -2242,24 +2248,24 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -2276,9 +2282,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -2287,21 +2293,20 @@ dependencies = [ [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-macro", "futures-task", "pin-project-lite", - "pin-utils", "slab", ] @@ -2338,6 +2343,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + [[package]] name = "glam" version = "0.30.10" @@ -2357,7 +2375,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "gpu-alloc-types", ] @@ -2367,7 +2385,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -2388,7 +2406,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2399,7 +2417,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -2436,7 +2454,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "core_maths", "read-fonts 0.36.0", @@ -2484,6 +2502,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -2507,6 +2531,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "image" version = "0.25.9" @@ -2529,13 +2559,15 @@ checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] name = "inventory" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc61209c082fbeb19919bee74b176221b27223e27b65d781eb91af24eb1fb46e" +checksum = "009ae045c87e7082cb72dab0ccd01ae075dd00141ddc108f43a0ea150a9e7227" dependencies = [ "rustversion", ] @@ -2549,6 +2581,12 @@ dependencies = [ "either", ] +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + [[package]] name = "jni" version = "0.21.1" @@ -2577,15 +2615,15 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "93f0862381daaec758576dcc22eb7bbf4d7efd67328553f3b45a412a51a3fb21" dependencies = [ "once_cell", "wasm-bindgen", @@ -2597,7 +2635,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff7f53bdf698e7aa7ec916411bbdc8078135da11b66db5182675b2227f6c0d07" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -2606,6 +2644,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.180" @@ -2634,9 +2678,9 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "libc", - "redox_syscall 0.7.0", + "redox_syscall 0.7.1", ] [[package]] @@ -2698,15 +2742,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -2717,7 +2761,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -2754,7 +2798,7 @@ checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "codespan-reporting", @@ -2796,7 +2840,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "jni-sys", "log", "ndk-sys", @@ -2822,11 +2866,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "225e7cfe711e0ba79a68baeddb2982723e4235247aefce1482f2f16c27865b66" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "libc", @@ -2934,7 +2978,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -2950,7 +2994,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "objc2 0.6.3", "objc2-core-graphics", "objc2-foundation 0.3.2", @@ -2962,7 +3006,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -2986,7 +3030,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -2998,7 +3042,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "dispatch2", "objc2 0.6.3", ] @@ -3009,7 +3053,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "dispatch2", "objc2 0.6.3", "objc2-core-foundation", @@ -3052,7 +3096,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "dispatch", "libc", @@ -3065,7 +3109,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "objc2 0.6.3", "objc2-core-foundation", ] @@ -3076,7 +3120,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "objc2 0.6.3", "objc2-core-foundation", ] @@ -3099,7 +3143,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -3111,7 +3155,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -3134,7 +3178,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit", @@ -3166,7 +3210,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -3212,9 +3256,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "5.0.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2c1f9f56e534ac6a9b8a4600bdf0f530fb393b5f393e7b4d03489c3cf0c3f01" +checksum = "7f4779c6901a562440c3786d08192c6fbda7c1c2060edd10006b05ee35d10f2d" dependencies = [ "num-traits", ] @@ -3295,12 +3339,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "piper" version = "0.2.4" @@ -3320,11 +3358,11 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "png" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "crc32fast", "fdeflate", "flate2", @@ -3347,15 +3385,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" dependencies = [ "portable-atomic", ] @@ -3384,6 +3422,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -3470,7 +3518,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom", + "getrandom 0.3.4", ] [[package]] @@ -3543,23 +3591,23 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] name = "redox_syscall" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -3569,9 +3617,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -3580,9 +3628,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" [[package]] name = "renderdoc-sys" @@ -3596,7 +3644,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "once_cell", "serde", "serde_derive", @@ -3631,7 +3679,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -3644,7 +3692,7 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys 0.11.0", @@ -3729,6 +3777,19 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -3772,9 +3833,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slotmap" @@ -3815,7 +3876,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -3858,9 +3919,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -3998,9 +4059,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ "winnow", ] @@ -4124,9 +4185,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-linebreak" @@ -4160,11 +4221,11 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uuid" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" +checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" dependencies = [ - "getrandom", + "getrandom 0.4.1", "js-sys", "serde_core", "wasm-bindgen", @@ -4212,11 +4273,20 @@ dependencies = [ "wit-bindgen", ] +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "1de241cdc66a9d91bd84f097039eb140cdc6eec47e0cdbaf9d932a1dd6c35866" dependencies = [ "cfg-if", "once_cell", @@ -4227,9 +4297,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "a42e96ea38f49b191e08a1bab66c7ffdba24b06f9995b39a9dd60222e5b6f1da" dependencies = [ "cfg-if", "futures-util", @@ -4241,9 +4311,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "e12fdf6649048f2e3de6d7d5ff3ced779cdedee0e0baffd7dff5cdfa3abc8a52" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4251,9 +4321,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "0e63d1795c565ac3462334c1e396fd46dbf481c40f51f5072c310717bc4fb309" dependencies = [ "bumpalo", "proc-macro2", @@ -4264,18 +4334,52 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "e9f9cdac23a5ce71f6bf9f8824898a501e511892791ea2a0c6b8568c68b9cb53" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "f2c7c5718134e770ee62af3b6b4a84518ec10101aad610c024b64d6ff29bb1ff" dependencies = [ "js-sys", "wasm-bindgen", @@ -4304,7 +4408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "document-features", @@ -4330,7 +4434,7 @@ dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "cfg_aliases", "document-features", @@ -4380,7 +4484,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.10.0", + "bitflags 2.11.0", "block", "bytemuck", "cfg-if", @@ -4418,7 +4522,7 @@ version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytemuck", "js-sys", "log", @@ -4856,7 +4960,7 @@ checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" dependencies = [ "android-activity", "atomic-waker", - "bitflags 2.10.0", + "bitflags 2.11.0", "block2 0.5.1", "bytemuck", "calloop", @@ -4906,6 +5010,88 @@ name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "x11-dl" @@ -4945,7 +5131,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "dlib", "log", "once_cell", @@ -4972,24 +5158,30 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + [[package]] name = "zune-core" version = "0.4.12" diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index e5f5efc..72b21c4 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -23,7 +23,7 @@ where /// The systems' schedules pub schedule: InternedScheduleLabel, /// time context marker - time_context_marker: PhantomData, + marker: PhantomData, } impl BevyLookupCurveInterpolationPlugin where @@ -33,7 +33,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - time_context_marker: PhantomData::default(), + marker: PhantomData::default(), } } } @@ -43,7 +43,7 @@ where { fn build(&self, app: &mut App) { app.add_systems( - self.schedule.clone(), + self.schedule, ( sample_lookup_curve_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), diff --git a/src/lib.rs b/src/lib.rs index fcb3bc6..ea27b43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -361,7 +361,6 @@ use bevy::ecs::schedule::{InternedScheduleLabel, ScheduleLabel}; use bevy::ecs::system::ScheduleSystem; use bevy::{app::PluginGroupBuilder, prelude::*}; -use bevy_time_runner::TimeRunnerSystemsPlugin; use std::marker::PhantomData; mod utils; @@ -433,7 +432,7 @@ where /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. pub enable_debug: bool, /// A marker for the plugins time context - time_context_marker: PhantomData, + marker: PhantomData, } impl PluginGroup for DefaultTweenPlugins @@ -441,17 +440,38 @@ where TimeCtx: Default + Send + Sync + 'static, { fn build(self) -> bevy::app::PluginGroupBuilder { + let mut tween_core_plugin = + TweenCorePlugin::::in_schedule(self.schedule); + tween_core_plugin.enable_debug = self.enable_debug; let group = PluginGroupBuilder::start::() - .add(TweenCorePlugin { - schedule: self.schedule.clone(), - enable_debug: self.enable_debug, - }) + .add(tween_core_plugin) .add_group(tween_event::DefaultTweenEventPlugins { - schedule: self.schedule.clone(), + schedule: self.schedule, }) - .add(TweenSystemsPlugins::::in_schedule( - self.schedule.clone(), - )); + .add( + interpolation::EaseKindPlugin::::in_schedule( + self.schedule, + ) + ) + .add( + interpolate::DefaultInterpolatorsPlugin::::in_schedule( + self.schedule, + ) + ) + .add( + interpolate::DefaultDynInterpolatorsPlugin::::in_schedule( + self.schedule, + ) + ) + .add( + SystemSetsRegistraitonPlugin { + schedule: self.schedule, + } + ); + + #[cfg(feature = "bevy_lookup_curve")] + group.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::in_schedule(self.schedule)); + group } } @@ -463,8 +483,8 @@ where /// Constructor for schedule pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { - time_context_marker: PhantomData::default(), - schedule: schedule.clone(), + marker: PhantomData::default(), + schedule, ..default() } } @@ -477,61 +497,7 @@ where Self { schedule: PostUpdate.intern(), enable_debug: true, - time_context_marker: PhantomData::default(), - } - } -} - -/// Tween system and type registration -struct TweenSystemsPlugins -where - TimeCtx: Default + Send + Sync + 'static, -{ - /// The schedule in which the time-context based systems would be executed - schedule: InternedScheduleLabel, - time_context_marker: PhantomData, -} -impl TweenSystemsPlugins -where - TimeCtx: Default + Send + Sync + 'static, -{ - /// Constructor for schedule - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { - Self { - schedule, - time_context_marker: PhantomData::default(), - } - } -} - -impl Plugin for TweenSystemsPlugins -where - TimeCtx: Default + Send + Sync + 'static, -{ - fn build(&self, app: &mut App) { - #[allow(clippy::let_and_return)] - app.add_plugins(( - interpolation::EaseKindPlugin::::in_schedule( - self.schedule.clone(), - ), - interpolate::DefaultInterpolatorsPlugin::::in_schedule( - self.schedule.clone(), - ), - interpolate::DefaultDynInterpolatorsPlugin::::in_schedule( - self.schedule.clone(), - ), - SystemSetsRegistraitonPlugin { - schedule: self.schedule.clone(), - }, - )); - #[cfg(feature = "bevy_lookup_curve")] - app.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::on_schedule(self.schedule.clone())); - if !app.is_plugin_added::>() { - app.add_plugins( - TimeRunnerSystemsPlugin::::from_schedule_intern( - self.schedule.clone(), - ), - ); + marker: PhantomData::default(), } } } @@ -567,22 +533,32 @@ impl Default for TweenAppResource { /// /// [`UpdateInterpolationValue`]: [`TweenSystemSet::UpdateInterpolationValue`] /// [`ApplyTween`]: [`TweenSystemSet::ApplyTween`] -pub struct TweenCorePlugin { +pub struct TweenCorePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ /// The schedule to register the core time-runner plugin in schedule: InternedScheduleLabel, /// Enable debug information and warnings. /// /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. pub enable_debug: bool, + /// A marker for the plugins time context + marker: PhantomData, } -impl Plugin for TweenCorePlugin { +impl Plugin for TweenCorePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ fn build(&self, app: &mut App) { if !app.is_plugin_added::() { - app.add_plugins(bevy_time_runner::TimeRunnerPlugin { - schedule: self.schedule.clone(), - enable_debug: self.enable_debug, - }); + let mut time_runner_plugin = + bevy_time_runner::TimeRunnerPlugin::::in_schedule( + self.schedule, + ); + time_runner_plugin.enable_debug = self.enable_debug; + app.add_plugins(time_runner_plugin); } app.register_type::() @@ -590,6 +566,32 @@ impl Plugin for TweenCorePlugin { } } +impl TweenCorePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Constructor for schedule + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + marker: PhantomData::default(), + schedule, + ..default() + } + } +} +impl Default for TweenCorePlugin +where + TimeCtx: Default + Send + Sync + 'static, +{ + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + enable_debug: true, + marker: PhantomData::default(), + } + } +} + /// A plugin for registering the system sets in specific schedule struct SystemSetsRegistraitonPlugin { /// The schedule to register the sets in diff --git a/src/tween_event.rs b/src/tween_event.rs index 95597c9..f78b66f 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -45,8 +45,7 @@ where { /// The systems schedule pub schedule: InternedScheduleLabel, - data_marker: PhantomData, - time_context_marker: PhantomData, + marker: PhantomData<(Data, TimeCtx)>, } impl TweenEventPlugin where @@ -57,8 +56,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - data_marker: PhantomData::default(), - time_context_marker: PhantomData::default(), + marker: PhantomData::default(), } } } @@ -69,7 +67,7 @@ where { fn build(&self, app: &mut App) { app.add_systems( - self.schedule.clone(), + self.schedule, (tween_event_system::) .in_set(crate::TweenSystemSet::ApplyTween), ) From e363d1192c310fd192c870d1ea5bd0dae334e958 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:27:55 +0200 Subject: [PATCH 31/68] Update CHANGELOG.md --- CHANGELOG.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89b3eb..a226e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,20 +3,14 @@ ## Unreleased - XXXX-XX-XX Breaking: - +- you'd now have to specify a schedule for `DefaultTweenPlugins` to run in using the `in_schedule` function - rename `TweenAppResource`'s `schedule` field to `default_schedule` now that there can be more - add `enable_time_runner_debug` field to `TweenCorePlugin` - Add `enable_debug` option to `TweenCorePlugin` by [#75](https://github.com/Multirious/bevy_tween/pull/75) - Migrate to Bevy 0.18 by [#75](https://github.com/Multirious/bevy_tween/pull/75) - Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) -- Add the ability to register systems for different schedules other than the default one (important if you want the animators from the bullet above to update the interpolation values at the right time) - - To do that (see `time_context_animation.rs` example): - - do not register `DefaultTweenPlugins` - - register `TweenScheduleIndependentPlugins` - - register `TweenSchedulesDependentPlugins { schedules: [your_schedules_here] }` - - for each `TimeCtx`, choose a schedule in which it should be applied, then register - `TweenScheduleAndStepDependentPlugins::::for_schedule([schedule_here])` + - In order for tweens to work on a different time context, you have to register another instance of the `DefaultTweenPlugins`, for example: `DefaultTweenPlugins::::in_schedule(FixedLast.intern())`, see time_context_animation example - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` - Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) - Use latest instead of a version for stableRust in flake.nix From 93ce91ed78e62bcea507ad2f4913526e3b99e14f Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:42:07 +0200 Subject: [PATCH 32/68] update examples * add DefaultTweenPluginsOnDefaultTime for ease of use * update examples to use it * update changelog --- CHANGELOG.md | 1 + examples/animation/banner_bounce.rs | 44 +++++++++++------- examples/animation/banner_triangle.rs | 6 +-- examples/animation/thumbnail_triangle.rs | 7 ++- examples/bevy_lookup_curve.rs | 6 +-- examples/demo/click.rs | 5 +- examples/demo/delta_tweens.rs | 5 +- examples/demo/entity_event.rs | 5 +- examples/demo/event.rs | 5 +- examples/demo/follow.rs | 2 +- examples/demo/hold.rs | 2 +- examples/demo/sprite_sheet.rs | 9 +++- examples/demo/time_context_animation.rs | 14 +----- examples/entity_structure.rs | 59 ++++++++++++++---------- examples/interpolator.rs | 16 +++++-- src/lib.rs | 5 ++ 16 files changed, 118 insertions(+), 73 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a226e5c..85794ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Breaking: - you'd now have to specify a schedule for `DefaultTweenPlugins` to run in using the `in_schedule` function + - For default usage, you could either manually write: `DefaultTweenPlugins::<()>::in_schedule(PostUpdate.intern())`, or use `DefaultTweenPluginsOnDefaultTime::default()` - rename `TweenAppResource`'s `schedule` field to `default_schedule` now that there can be more - add `enable_time_runner_debug` field to `TweenCorePlugin` - Add `enable_debug` option to `TweenCorePlugin` by [#75](https://github.com/Multirious/bevy_tween/pull/75) diff --git a/examples/animation/banner_bounce.rs b/examples/animation/banner_bounce.rs index 3964852..9bf2460 100644 --- a/examples/animation/banner_bounce.rs +++ b/examples/animation/banner_bounce.rs @@ -1,15 +1,16 @@ use std::f32::consts::PI; +use bevy::render::view::Hdr; use bevy::{ - color::{palettes::css::WHITE, Srgba}, - core_pipeline::{tonemapping::Tonemapping}, + color::{Srgba, palettes::css::WHITE}, + core_pipeline::tonemapping::Tonemapping, + ecs::schedule::ScheduleLabel, post_process::bloom::Bloom, prelude::*, window, }; -use bevy::render::view::Hdr; use bevy_tween::{ - combinator::{go, parallel, sequence, tween_exact, AnimationCommands}, + combinator::{AnimationCommands, go, parallel, sequence, tween_exact}, prelude::*, }; @@ -35,7 +36,7 @@ fn main() { }), ..default() }), - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), )) .add_systems(Startup, (animation, setup_camera)) .run(); @@ -205,7 +206,8 @@ fn animation(mut commands: Commands, asset_server: Res) { // ======================================================================== let mut bevy_tween_text_color = bevy_tween_text.state(white_color); let mut bevy_tween_text_angle_z = bevy_tween_text.state(PI); - let mut bevy_tween_text_scale = bevy_tween_text.state(Vec3::ZERO * SCALE_AS_F32); + let mut bevy_tween_text_scale = + bevy_tween_text.state(Vec3::ZERO * SCALE_AS_F32); let mut square_and_triangle_scale = square_and_triangle.state(Vec3::ZERO * SCALE_AS_F32); let mut square_and_triangle_alpha = square_and_triangle.state(1.); @@ -219,7 +221,8 @@ fn animation(mut commands: Commands, asset_server: Res) { cornering_right.state(cornering_right_tween_start); let mut cornering_left_translation = cornering_left.state(cornering_left_tween_start); - let mut dot_grid_scale = dot_grid.state(Vec3::new(0.01, 0.01, 0.) * SCALE_AS_F32); + let mut dot_grid_scale = + dot_grid.state(Vec3::new(0.01, 0.01, 0.) * SCALE_AS_F32); fn secs(secs: f32) -> Duration { Duration::from_secs_f32(secs) @@ -240,18 +243,21 @@ fn animation(mut commands: Commands, asset_server: Res) { tween_exact( secs(0.)..secs(9.), EaseKind::CircularOut, - bevy_tween_text_scale.with(scale_to(Vec3::ONE * SCALE_AS_F32)), + bevy_tween_text_scale + .with(scale_to(Vec3::ONE * SCALE_AS_F32)), ), tween_exact( secs(11.)..secs(11.5), EaseKind::SineOut, - bevy_tween_text_scale - .with(scale_to(Vec3::ONE * text_pop_scale * SCALE_AS_F32)), + bevy_tween_text_scale.with(scale_to( + Vec3::ONE * text_pop_scale * SCALE_AS_F32, + )), ), tween_exact( secs(11.5)..secs(12.), EaseKind::SineIn, - bevy_tween_text_scale.with(scale_to(Vec3::ZERO * SCALE_AS_F32)), + bevy_tween_text_scale + .with(scale_to(Vec3::ZERO * SCALE_AS_F32)), ), tween_exact( secs(10.)..secs(12.), @@ -275,7 +281,8 @@ fn animation(mut commands: Commands, asset_server: Res) { tween_exact( secs(0.)..secs(9.), EaseKind::CircularOut, - square_and_triangle_scale.with(scale_to(Vec3::ONE * SCALE_AS_F32)), + square_and_triangle_scale + .with(scale_to(Vec3::ONE * SCALE_AS_F32)), ), tween_exact( secs(4.)..secs(10.), @@ -353,8 +360,9 @@ fn animation(mut commands: Commands, asset_server: Res) { tween_exact( secs(11.5)..secs(12.), EaseKind::QuadraticInOut, - dot_grid_scale - .with(scale_to(Vec3::new(0.01, 0.01, 0.) * SCALE_AS_F32)), + dot_grid_scale.with(scale_to( + Vec3::new(0.01, 0.01, 0.) * SCALE_AS_F32, + )), ), ), go(secs(12.)), @@ -363,9 +371,11 @@ fn animation(mut commands: Commands, asset_server: Res) { type InterpolateSpriteAlpha = Box>; fn sprite_alpha(start: f32, end: f32) -> InterpolateSpriteAlpha { - Box::new(interpolate::closure(move |sprite: &mut Sprite, value, _| { - sprite.color = sprite.color.with_alpha(start.lerp(end, value)); - })) + Box::new(interpolate::closure( + move |sprite: &mut Sprite, value, _| { + sprite.color = sprite.color.with_alpha(start.lerp(end, value)); + }, + )) } fn sprite_alpha_to(to: f32) -> impl Fn(&mut f32) -> InterpolateSpriteAlpha { diff --git a/examples/animation/banner_triangle.rs b/examples/animation/banner_triangle.rs index 5d5acdb..230affd 100644 --- a/examples/animation/banner_triangle.rs +++ b/examples/animation/banner_triangle.rs @@ -1,12 +1,12 @@ -use std::f32::consts::TAU; use bevy::prelude::*; use bevy::window::WindowResolution; use bevy_tween::{ - combinator::{parallel, tween_exact, AnimationCommands}, + combinator::{AnimationCommands, parallel, tween_exact}, interpolate::{angle_z, translation}, prelude::*, tween::{AnimationTarget, TargetComponent}, }; +use std::f32::consts::TAU; fn main() { App::new() @@ -20,7 +20,7 @@ fn main() { }), ..Default::default() }), - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), )) .add_systems(Startup, setup) .run(); diff --git a/examples/animation/thumbnail_triangle.rs b/examples/animation/thumbnail_triangle.rs index 562c8e8..512d8cc 100644 --- a/examples/animation/thumbnail_triangle.rs +++ b/examples/animation/thumbnail_triangle.rs @@ -2,7 +2,7 @@ use std::f32::consts::TAU; use bevy::prelude::*; use bevy_tween::{ - combinator::{parallel, tween_exact, AnimationCommands}, + combinator::{AnimationCommands, parallel, tween_exact}, interpolate::angle_z, prelude::*, tween::TargetComponent, @@ -10,7 +10,10 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins((DefaultPlugins, DefaultTweenPlugins)) + .add_plugins(( + DefaultPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, setup) .run(); } diff --git a/examples/bevy_lookup_curve.rs b/examples/bevy_lookup_curve.rs index bf55b28..0214ade 100644 --- a/examples/bevy_lookup_curve.rs +++ b/examples/bevy_lookup_curve.rs @@ -2,8 +2,8 @@ use bevy::prelude::*; use bevy_inspector_egui::bevy_egui::EguiPlugin; use bevy_tween::{ bevy_lookup_curve::{ - editor::LookupCurveEditor, Knot, KnotInterpolation, LookupCurve, - LookupCurvePlugin, + Knot, KnotInterpolation, LookupCurve, LookupCurvePlugin, + editor::LookupCurveEditor, }, combinator::tween, interpolate::translation, @@ -16,7 +16,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), EguiPlugin::default(), LookupCurvePlugin, )) diff --git a/examples/demo/click.rs b/examples/demo/click.rs index 63bc19d..ceefc47 100644 --- a/examples/demo/click.rs +++ b/examples/demo/click.rs @@ -14,7 +14,10 @@ fn secs(secs: f32) -> Duration { fn main() { App::new() - .add_plugins((DefaultPlugins, DefaultTweenPlugins)) + .add_plugins(( + DefaultPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, setup) .add_systems( Update, diff --git a/examples/demo/delta_tweens.rs b/examples/demo/delta_tweens.rs index 9571c06..8347d37 100644 --- a/examples/demo/delta_tweens.rs +++ b/examples/demo/delta_tweens.rs @@ -11,7 +11,10 @@ fn secs(secs: f32) -> Duration { fn main() { App::new() - .add_plugins((DefaultPlugins, DefaultTweenPlugins)) + .add_plugins(( + DefaultPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, (setup, spawn_circle_with_tweens)) .run(); } diff --git a/examples/demo/entity_event.rs b/examples/demo/entity_event.rs index f024cf2..7de26f6 100644 --- a/examples/demo/entity_event.rs +++ b/examples/demo/entity_event.rs @@ -7,7 +7,10 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins((MinimalPlugins, DefaultTweenPlugins)) + .add_plugins(( + MinimalPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, setup) .add_observer(|trigger: On>| { println!("TweenEvent: {}", trigger.data) diff --git a/examples/demo/event.rs b/examples/demo/event.rs index f41c5e8..3f11a8b 100644 --- a/examples/demo/event.rs +++ b/examples/demo/event.rs @@ -9,7 +9,10 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins((DefaultPlugins, DefaultTweenPlugins)) + .add_plugins(( + DefaultPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, setup) .add_systems(Update, (effect_system, despawn_effect_system)) .run(); diff --git a/examples/demo/follow.rs b/examples/demo/follow.rs index 03ee19d..345d662 100644 --- a/examples/demo/follow.rs +++ b/examples/demo/follow.rs @@ -20,7 +20,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), EguiPlugin::default(), ResourceInspectorPlugin::::new(), )) diff --git a/examples/demo/hold.rs b/examples/demo/hold.rs index a0a7447..3a6b781 100644 --- a/examples/demo/hold.rs +++ b/examples/demo/hold.rs @@ -57,7 +57,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), interpolate::custom_interpolators_plugin, )) .add_systems(Startup, setup) diff --git a/examples/demo/sprite_sheet.rs b/examples/demo/sprite_sheet.rs index 7b56541..2ecd97c 100644 --- a/examples/demo/sprite_sheet.rs +++ b/examples/demo/sprite_sheet.rs @@ -25,7 +25,12 @@ mod interpolate { impl Interpolator for AtlasIndex { type Item = Sprite; - fn interpolate(&self, item: &mut Self::Item, value: f32, _previous_value: f32) { + fn interpolate( + &self, + item: &mut Self::Item, + value: f32, + _previous_value: f32, + ) { let Some(texture_atlas) = &mut item.texture_atlas else { return; }; @@ -40,7 +45,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(ImagePlugin::default_nearest()), - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), interpolate::custom_interpolators_plugin, )) .add_systems(Startup, setup) diff --git a/examples/demo/time_context_animation.rs b/examples/demo/time_context_animation.rs index bfc039b..31b872a 100644 --- a/examples/demo/time_context_animation.rs +++ b/examples/demo/time_context_animation.rs @@ -1,9 +1,5 @@ use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; -use bevy_tween::{ - TweenScheduleAndStepDependentPlugins, TweenScheduleIndependentPlugins, - TweenSchedulesDependentPlugins, combinator::*, prelude::*, - tween::AnimationTarget, -}; +use bevy_tween::{combinator::*, prelude::*, tween::AnimationTarget}; use std::time::Duration; fn secs(secs: f32) -> Duration { @@ -14,13 +10,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - TweenScheduleIndependentPlugins, - TweenSchedulesDependentPlugins { - schedules: vec![FixedLast.intern()], - }, - TweenScheduleAndStepDependentPlugins::::for_schedule( - FixedLast.intern(), - ), + DefaultTweenPluginsOnDefaultTime::default()::::in_schedule(FixedLast.intern()), )) .insert_resource(Time::::from_seconds(0.25)) .add_systems(Startup, (setup, spawn_circle_with_tweens)) diff --git a/examples/entity_structure.rs b/examples/entity_structure.rs index f69c442..e98ac40 100644 --- a/examples/entity_structure.rs +++ b/examples/entity_structure.rs @@ -8,7 +8,10 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins((DefaultPlugins, DefaultTweenPlugins)) + .add_plugins(( + DefaultPlugins, + DefaultTweenPluginsOnDefaultTime::default(), + )) .add_systems(Startup, setup) .run(); } @@ -169,29 +172,32 @@ fn setup(mut commands: Commands) { commands .spawn((sprite(start_x, y), AnimationTarget)) .with_children(|c| { - c.spawn((TimeRunner::new(Duration::from_secs(5)), TimeContext::<()>::default())) - .with_children(|c| { - c.spawn(( - TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), - EaseKind::QuadraticInOut, - ComponentTween::new_target( - TargetComponent::marker(), - Translation { - start: Vec3::new(start_x, y, 0.), - end: Vec3::new(end_x, y, 0.), - delta: false, - }, - ), - ComponentTween::new_target( - TargetComponent::marker(), - AngleZ { - start: angle_start, - end: angle_end, - delta: false, - }, - ), - )); - }); + c.spawn(( + TimeRunner::new(Duration::from_secs(5)), + TimeContext::<()>::default(), + )) + .with_children(|c| { + c.spawn(( + TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), + EaseKind::QuadraticInOut, + ComponentTween::new_target( + TargetComponent::marker(), + Translation { + start: Vec3::new(start_x, y, 0.), + end: Vec3::new(end_x, y, 0.), + delta: false, + }, + ), + ComponentTween::new_target( + TargetComponent::marker(), + AngleZ { + start: angle_start, + end: angle_end, + delta: false, + }, + ), + )); + }); }); // equivalent to // @@ -214,7 +220,10 @@ fn setup(mut commands: Commands) { let sprite = commands.spawn(sprite(start_x, y)).id(); commands - .spawn((TimeRunner::new(Duration::from_secs(5)),TimeContext::<()>::default())) + .spawn(( + TimeRunner::new(Duration::from_secs(5)), + TimeContext::<()>::default(), + )) .with_children(|c| { c.spawn(( TimeSpan::try_from(..Duration::from_secs(5)).unwrap(), diff --git a/examples/interpolator.rs b/examples/interpolator.rs index 2db688d..77dee3a 100644 --- a/examples/interpolator.rs +++ b/examples/interpolator.rs @@ -34,7 +34,12 @@ mod interpolate { impl Interpolator for CircleRadius { type Item = Circle; - fn interpolate(&self, item: &mut Self::Item, value: f32, _previous_value: f32) { + fn interpolate( + &self, + item: &mut Self::Item, + value: f32, + _previous_value: f32, + ) { item.radius = self.start.lerp(self.end, value); } } @@ -51,7 +56,12 @@ mod interpolate { impl Interpolator for CircleHue { type Item = Circle; - fn interpolate(&self, item: &mut Self::Item, value: f32, _previous_value: f32) { + fn interpolate( + &self, + item: &mut Self::Item, + value: f32, + _previous_value: f32, + ) { item.hue = self.start.lerp(self.end, value); } } @@ -66,7 +76,7 @@ fn main() { App::new() .add_plugins(( MinimalPlugins, - DefaultTweenPlugins, + DefaultTweenPluginsOnDefaultTime::default(), interpolate::interpolators_plugin, )) .add_systems(Startup, setup) diff --git a/src/lib.rs b/src/lib.rs index ea27b43..64e6472 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -405,6 +405,8 @@ pub mod prelude { pub use crate::BevyTweenRegisterSystems; pub use crate::DefaultTweenPlugins; + + pub use crate::DefaultTweenPluginsOnDefaultTime; } #[cfg(feature = "bevy_asset")] @@ -420,6 +422,9 @@ pub use tween::resource_tween_system; pub use tween_event::tween_event_system; +/// The default tween plugins on default time context +pub type DefaultTweenPluginsOnDefaultTime = DefaultTweenPlugins<()>; + /// Default plugins for using crate. pub struct DefaultTweenPlugins where From 2a6bbbc73410e55e8183728c4043f6901d56f75e Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:50:02 +0200 Subject: [PATCH 33/68] add component_tween_system_with_time_context * the previous component_tween_system retains api, the new fn allow for registration per TimeCtx * update changelog --- CHANGELOG.md | 1 + src/interpolate.rs | 35 +++++++++++++++++++++++------------ src/tween.rs | 2 +- src/tween/systems.rs | 13 ++++++++++++- 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85794ce..3471ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Breaking: - Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) - In order for tweens to work on a different time context, you have to register another instance of the `DefaultTweenPlugins`, for example: `DefaultTweenPlugins::::in_schedule(FixedLast.intern())`, see time_context_animation example - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` + - Add `component_tween_system_with_time_context` which is the same as `component_tween_system_with_time_context` but the system has the specified `TimeCtx` - Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) - Use latest instead of a version for stableRust in flake.nix - `nix flake update` diff --git a/src/interpolate.rs b/src/interpolate.rs index 1967d76..9eb7ffb 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -258,25 +258,34 @@ where app.add_tween_systems( schedule, ( - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), - tween::component_tween_system::(), + tween::component_tween_system_with_time_context::(), + tween::component_tween_system_with_time_context::(), + tween::component_tween_system_with_time_context::(), + tween::component_tween_system_with_time_context::(), ), ); #[cfg(feature = "bevy_sprite")] app.add_tween_systems( schedule, - tween::component_tween_system::(), + tween::component_tween_system_with_time_context::< + SpriteColor, + TimeCtx, + >(), ); #[cfg(feature = "bevy_ui")] app.add_tween_systems( schedule, ( - tween::component_tween_system::(), - tween::component_tween_system::(), + tween::component_tween_system_with_time_context::< + ui::BackgroundColor, + TimeCtx, + >(), + tween::component_tween_system_with_time_context::< + ui::BorderColor, + TimeCtx, + >(), ), ); @@ -342,7 +351,7 @@ where app.add_tween_systems( schedule, - tween::component_tween_system::< + tween::component_tween_system_with_time_context::< BoxedInterpolator, TimeCtx, >(), @@ -351,19 +360,21 @@ where #[cfg(feature = "bevy_sprite")] app.add_tween_systems( schedule, - tween::component_tween_system::, TimeCtx>( - ), + tween::component_tween_system_with_time_context::< + BoxedInterpolator, + TimeCtx, + >(), ); #[cfg(feature = "bevy_ui")] app.add_tween_systems( schedule, ( - tween::component_tween_system::< + tween::component_tween_system_with_time_context::< BoxedInterpolator, TimeCtx, >(), - tween::component_tween_system::< + tween::component_tween_system_with_time_context::< BoxedInterpolator, TimeCtx, >(), diff --git a/src/tween.rs b/src/tween.rs index 561b155..014c86a 100644 --- a/src/tween.rs +++ b/src/tween.rs @@ -224,7 +224,7 @@ pub use systems::{ }; pub use systems::{ apply_component_tween_system, component_dyn_tween_system, - component_tween_system, + component_tween_system, component_tween_system_with_time_context, }; pub use systems::{ apply_resource_tween_system, resource_dyn_tween_system, diff --git a/src/tween/systems.rs b/src/tween/systems.rs index cfa8b8d..08558c0 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -9,7 +9,18 @@ use tracing::error; /// Alias for [`apply_component_tween_system`] and may contains more systems /// in the future. -pub fn component_tween_system() -> ScheduleConfigs +pub fn component_tween_system() -> ScheduleConfigs +where + I: Interpolator + Send + Sync + 'static, + I::Item: Component, +{ + component_tween_system_with_time_context::().into_configs() +} + +/// Alias for [`apply_component_tween_system`] and may contains more systems +/// in the future. +pub fn component_tween_system_with_time_context() +-> ScheduleConfigs where I: Interpolator + Send + Sync + 'static, I::Item: Component, From d641e58da29d53805345e1b52762d39f77505ba1 Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:54:32 +0200 Subject: [PATCH 34/68] add component_tween_system_with_time_context --- CHANGELOG.md | 3 ++- src/tween/systems.rs | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3471ca0..c01b1fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ Breaking: - Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) - In order for tweens to work on a different time context, you have to register another instance of the `DefaultTweenPlugins`, for example: `DefaultTweenPlugins::::in_schedule(FixedLast.intern())`, see time_context_animation example - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` - - Add `component_tween_system_with_time_context` which is the same as `component_tween_system_with_time_context` but the system has the specified `TimeCtx` + - Add `component_tween_system_with_time_context` which is the same as `component_tween_system` but the system has the specified `TimeCtx` + - Add `component_dyn_tween_system_with_time_context` which is the same as `component_dyn_tween_system` but the system has the specified `TimeCtx` - Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) - Use latest instead of a version for stableRust in flake.nix - `nix flake update` diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 08558c0..29f06f6 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -14,7 +14,7 @@ where I: Interpolator + Send + Sync + 'static, I::Item: Component, { - component_tween_system_with_time_context::().into_configs() + apply_component_tween_system::.into_configs() } /// Alias for [`apply_component_tween_system`] and may contains more systems @@ -258,7 +258,19 @@ pub fn apply_component_tween_system( /// /// This currently exists for backward compatibility and there's not really any big reason to deprecate it just yet. /// You might want to use `component_tween_system::>()` for consistency -pub fn component_dyn_tween_system() +pub fn component_dyn_tween_system() -> ScheduleConfigs +where + C: Component, +{ + apply_component_tween_system::>, ()> + .into_configs() +} + +/// System alias for [`component_tween_system`] that uses boxed dynamic [`Interpolator`]. (`Box>()` for consistency +pub fn component_dyn_tween_system_with_time_context() -> ScheduleConfigs where C: Component, From 54e51165676f96cfea5cf5509efd810dbedbc05d Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:56:10 +0200 Subject: [PATCH 35/68] add resource_tween_system_with_time_context see two previous commits --- CHANGELOG.md | 1 + src/tween/systems.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c01b1fe..a4ac833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Breaking: - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` - Add `component_tween_system_with_time_context` which is the same as `component_tween_system` but the system has the specified `TimeCtx` - Add `component_dyn_tween_system_with_time_context` which is the same as `component_dyn_tween_system` but the system has the specified `TimeCtx` + - Add `resource_tween_system_with_time_context` which is the same as `resource_tween_system` but the system has the specified `TimeCtx` - Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) - Use latest instead of a version for stableRust in flake.nix - `nix flake update` diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 29f06f6..58c42b4 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -282,7 +282,18 @@ where /// Alias for [`apply_resource_tween_system`] and may contains more systems /// in the future. -pub fn resource_tween_system() -> ScheduleConfigs +pub fn resource_tween_system() -> ScheduleConfigs +where + I: Interpolator + Send + Sync + 'static, + I::Item: Resource, +{ + apply_resource_tween_system::.into_configs() +} + +/// Alias for [`apply_resource_tween_system`] and may contains more systems +/// in the future. +pub fn resource_tween_system_with_time_context() +-> ScheduleConfigs where I: Interpolator + Send + Sync + 'static, I::Item: Resource, From 713a8b012071b6884cc1b8f2dfab3b741b0e022a Mon Sep 17 00:00:00 2001 From: Rabbival <87331993+Rabbival@users.noreply.github.com> Date: Sun, 22 Feb 2026 11:59:25 +0200 Subject: [PATCH 36/68] finish updating examples --- examples/animation/banner_bounce.rs | 1 - examples/demo/hold.rs | 7 +++++-- examples/demo/sprite_sheet.rs | 3 ++- examples/demo/time_context_animation.rs | 5 +++-- examples/interpolator.rs | 15 +++++++++------ 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/examples/animation/banner_bounce.rs b/examples/animation/banner_bounce.rs index 9bf2460..5e7d4f7 100644 --- a/examples/animation/banner_bounce.rs +++ b/examples/animation/banner_bounce.rs @@ -4,7 +4,6 @@ use bevy::render::view::Hdr; use bevy::{ color::{Srgba, palettes::css::WHITE}, core_pipeline::tonemapping::Tonemapping, - ecs::schedule::ScheduleLabel, post_process::bloom::Bloom, prelude::*, window, diff --git a/examples/demo/hold.rs b/examples/demo/hold.rs index 3a6b781..dfdaf05 100644 --- a/examples/demo/hold.rs +++ b/examples/demo/hold.rs @@ -10,13 +10,16 @@ use bevy_tween::{bevy_time_runner::TimeRunner, prelude::*}; use rand::prelude::*; mod interpolate { - use bevy::prelude::*; + use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; use bevy_tween::{prelude::*, resource_tween_system}; pub use bevy_tween::interpolate::*; pub fn custom_interpolators_plugin(app: &mut App) { - app.add_tween_systems(resource_tween_system::()); + app.add_tween_systems( + PostUpdate.intern(), + resource_tween_system::(), + ); } pub struct EffectIntensity { diff --git a/examples/demo/sprite_sheet.rs b/examples/demo/sprite_sheet.rs index 2ecd97c..01dd755 100644 --- a/examples/demo/sprite_sheet.rs +++ b/examples/demo/sprite_sheet.rs @@ -2,13 +2,14 @@ use bevy::prelude::*; use bevy_tween::{prelude::*, tween::AnimationTarget}; mod interpolate { - use bevy::prelude::*; + use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; use bevy_tween::prelude::*; pub use bevy_tween::interpolate::*; pub fn custom_interpolators_plugin(app: &mut App) { app.add_tween_systems( + PostUpdate.intern(), bevy_tween::component_tween_system::(), ); } diff --git a/examples/demo/time_context_animation.rs b/examples/demo/time_context_animation.rs index 31b872a..dca6fbf 100644 --- a/examples/demo/time_context_animation.rs +++ b/examples/demo/time_context_animation.rs @@ -1,4 +1,5 @@ -use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; +use bevy::ecs::schedule::ScheduleLabel; +use bevy::prelude::*; use bevy_tween::{combinator::*, prelude::*, tween::AnimationTarget}; use std::time::Duration; @@ -10,7 +11,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default()::::in_schedule(FixedLast.intern()), + DefaultTweenPlugins::::in_schedule(FixedLast.intern()), )) .insert_resource(Time::::from_seconds(0.25)) .add_systems(Startup, (setup, spawn_circle_with_tweens)) diff --git a/examples/interpolator.rs b/examples/interpolator.rs index 77dee3a..4ddb73e 100644 --- a/examples/interpolator.rs +++ b/examples/interpolator.rs @@ -13,17 +13,20 @@ pub struct Circle { mod interpolate { use super::Circle; - use bevy::prelude::*; + use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; use bevy_tween::{ component_dyn_tween_system, component_tween_system, prelude::*, }; pub fn interpolators_plugin(app: &mut App) { - app.add_tween_systems(( - component_dyn_tween_system::(), - component_tween_system::(), - component_tween_system::(), - )); + app.add_tween_systems( + PostUpdate.intern(), + ( + component_dyn_tween_system::(), + component_tween_system::(), + component_tween_system::(), + ), + ); } pub struct CircleRadius { From 925b831d5529f3b93f1e98258e84f2f9aa14d417 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:07:01 +0700 Subject: [PATCH 37/68] Update docs for BevyLookupCurveInterpolationPlugin --- src/interpolation/bevy_lookup_curve.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 72b21c4..462398e 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -15,21 +15,20 @@ use ::bevy_lookup_curve::{LookupCache, LookupCurve}; use bevy::platform::collections::HashSet; use tracing::error; -/// Use [`bevy_lookup_curve`](::bevy_lookup_curve) for interpolation on the specified schedule +/// Use [`bevy_lookup_curve`](::bevy_lookup_curve) for interpolation pub struct BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The systems' schedules + /// The schedule this plugin will register all the systems to. pub schedule: InternedScheduleLabel, - /// time context marker marker: PhantomData, } impl BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Constructor for that schedule + /// The plugin will register all systems to this schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From 2df4566c572f26b5b16d9c5a292db8d6eac5f83d Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:07:34 +0700 Subject: [PATCH 38/68] Impl Default for BevyLookupCurveInterpolationPlugin<()> --- src/interpolation/bevy_lookup_curve.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 462398e..1eefce6 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -53,6 +53,15 @@ where } } +impl Default for BevyLookupCurveInterpolationPlugin<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), + } + } +} + /// Wrapper for [`LookupCache`] to make it a component #[derive(Clone, Debug, Component, Reflect)] #[reflect(Component)] From 3d7765df6f3d5e11d7251d66781ac720b37775d7 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:10:20 +0700 Subject: [PATCH 39/68] Update docs for BevyLookupCurveInterpolationPlugin --- src/interpolation/bevy_lookup_curve.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 1eefce6..222348c 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -20,7 +20,7 @@ pub struct BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule this plugin will register all the systems to. + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData, } @@ -28,7 +28,7 @@ impl BevyLookupCurveInterpolationPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The plugin will register all systems to this schedule. + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From c37a2c55750e98bd53417accc5690f1e41ff3974 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:11:34 +0700 Subject: [PATCH 40/68] Make BevyLookupCurveInterpolationPlugin use TweenAppResource --- src/interpolation/bevy_lookup_curve.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 222348c..504178a 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -41,8 +41,14 @@ where TimeCtx: Default + Send + Sync + 'static, { fn build(&self, app: &mut App) { + #[allow(deprecated)] + let schedule = app + .world() + .get_resource::() + .map(|a| a.schedule) + .unwrap_or(self.schedule); app.add_systems( - self.schedule, + schedule, ( sample_lookup_curve_system:: .in_set(TweenSystemSet::UpdateInterpolationValue), From 4963babcedd39383257403ca4bd9398d48cdab45 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:12:24 +0700 Subject: [PATCH 41/68] Update docs for DefaultDynInterpolatorsPlugin --- src/interpolate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 9eb7ffb..d31c383 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -332,7 +332,7 @@ pub struct DefaultDynInterpolatorsPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule the systems should run on. + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData, } @@ -396,7 +396,7 @@ impl DefaultDynInterpolatorsPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Initialize this plugin's system on this schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From 5dbe219add5d7b2e0d61b024d122de847c30bd72 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:12:55 +0700 Subject: [PATCH 42/68] Impl Default for BevyLookupCurveInterpolationPlugin<()> --- src/interpolate.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/interpolate.rs b/src/interpolate.rs index d31c383..1729192 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -404,3 +404,12 @@ where } } } + +impl Default for DefaultDynInterpolatorsPlugin<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), + } + } +} From 5fad9a90de69c4974dbf0eb1a468593199adad12 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:14:01 +0700 Subject: [PATCH 43/68] Update docs for DefaultInterpolatorsPlugin --- src/interpolate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 1729192..afc55ab 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -223,7 +223,7 @@ pub struct DefaultInterpolatorsPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule the systems should run on. + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData, } @@ -301,7 +301,7 @@ impl DefaultInterpolatorsPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Initialize this plugin's system on this schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From 6e961551504998388bbbf7c90f41cf830c929f3d Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:16:13 +0700 Subject: [PATCH 44/68] Update docs for TweenEventPlugin --- src/tween_event.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tween_event.rs b/src/tween_event.rs index f78b66f..631251a 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -43,7 +43,7 @@ where Data: Send + Sync + 'static + Clone, TimeCtx: Default + Send + Sync + 'static, { - /// The systems schedule + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData<(Data, TimeCtx)>, } @@ -52,7 +52,7 @@ where Data: Send + Sync + 'static + Clone, TimeCtx: Default + Send + Sync + 'static, { - /// Constructor for schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From a5720c885ae275e5216821b9df595693ecf86356 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:16:47 +0700 Subject: [PATCH 45/68] Make TweenEventPlugin use TweenAppResource --- src/tween_event.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tween_event.rs b/src/tween_event.rs index 631251a..10837c8 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -66,8 +66,14 @@ where TimeCtx: Default + Send + Sync + 'static, { fn build(&self, app: &mut App) { + #[allow(deprecated)] + let schedule = app + .world() + .get_resource::() + .map(|a| a.schedule) + .unwrap_or(self.schedule); app.add_systems( - self.schedule, + schedule, (tween_event_system::) .in_set(crate::TweenSystemSet::ApplyTween), ) From b8f842624ebec94ce509f7e55a495f506ef55fbf Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:22:37 +0700 Subject: [PATCH 46/68] [!Breaking] Update DefaultTweenEventPlugins - Add TimeCtx generic that defaults to `()` - Add private `marker` field (Breaking) - Add `in_schedule` constructor - Impl Default for `DefaultTweenEventPlugins<()>` --- src/tween_event.rs | 52 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/src/tween_event.rs b/src/tween_event.rs index 10837c8..fcc97e3 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -28,14 +28,15 @@ use bevy_time_runner::TimeContext; use std::marker::PhantomData; -use bevy::{app::PluginGroupBuilder, prelude::*}; +use bevy::{ + app::PluginGroupBuilder, + ecs::schedule::{InternedScheduleLabel, ScheduleLabel}, + prelude::*, +}; use bevy_time_runner::TimeSpanProgress; -use crate::{ - InternedScheduleLabel, - tween::{SkipTween, TweenInterpolationValue}, -}; +use crate::tween::{SkipTween, TweenInterpolationValue}; /// A plugin for registering the tween event system for tween of type Data for the specified schedule pub struct TweenEventPlugin @@ -84,18 +85,49 @@ where /// Default tween event plugins: /// - `TweenEventPlugin::<()>::default()`, /// - `TweenEventPlugin::<&'static str>::default()` -pub struct DefaultTweenEventPlugins { - /// Schedule to register default tweens in +pub struct DefaultTweenEventPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, + marker: PhantomData, } -impl PluginGroup for DefaultTweenEventPlugins { +impl PluginGroup for DefaultTweenEventPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ #[allow(unused)] #[allow(clippy::let_and_return)] fn build(self) -> PluginGroupBuilder { PluginGroupBuilder::start::() - .add(TweenEventPlugin::<()>::in_schedule(self.schedule)) - .add(TweenEventPlugin::<&'static str>::in_schedule(self.schedule)) + .add(TweenEventPlugin::<(), TimeCtx>::in_schedule(self.schedule)) + .add(TweenEventPlugin::<&'static str, TimeCtx>::in_schedule( + self.schedule, + )) + } +} + +impl DefaultTweenEventPlugins +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Register all systems from this plugin to the specified schedule. + pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + Self { + schedule, + marker: PhantomData::default(), + } + } +} + +impl Default for DefaultTweenEventPlugins<()> { + fn default() -> Self { + Self { + schedule: PostUpdate.intern(), + marker: Default::default(), + } } } From 46bc19019f0e68ac0145986406a568bf216b7870 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:25:01 +0700 Subject: [PATCH 47/68] Update docs for EaseClosurePlugin --- src/interpolation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpolation.rs b/src/interpolation.rs index 76f5a0a..56ac33d 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -443,7 +443,7 @@ pub struct EaseClosurePlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule the systems should run on. + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData, } @@ -452,7 +452,7 @@ impl EaseClosurePlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Initialize this plugin's system on this schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From b6be7020aa4b71d143598b139cdfaeedc848db70 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:25:47 +0700 Subject: [PATCH 48/68] Update docs for EaseKindPlugin --- src/interpolation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpolation.rs b/src/interpolation.rs index 56ac33d..93eeef9 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -38,7 +38,7 @@ pub struct EaseKindPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule the systems should run on. + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, marker: PhantomData, } @@ -47,7 +47,7 @@ impl EaseKindPlugin where TimeCtx: Default + Send + Sync + 'static, { - /// Initialize this plugin's system in this schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, From 13229e197514f0758d19998d54429065e8e3ef0e Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:29:33 +0700 Subject: [PATCH 49/68] Update DefaultTweenPlugins::build impl --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 64e6472..3de1909 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -450,9 +450,9 @@ where tween_core_plugin.enable_debug = self.enable_debug; let group = PluginGroupBuilder::start::() .add(tween_core_plugin) - .add_group(tween_event::DefaultTweenEventPlugins { - schedule: self.schedule, - }) + .add_group(tween_event::DefaultTweenEventPlugins::::in_schedule( + self.schedule, + )) .add( interpolation::EaseKindPlugin::::in_schedule( self.schedule, @@ -475,7 +475,7 @@ where ); #[cfg(feature = "bevy_lookup_curve")] - group.add_plugins(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationForSchedulePlugin::::in_schedule(self.schedule)); + let group = group.add(interpolation::bevy_lookup_curve::BevyLookupCurveInterpolationPlugin::::in_schedule(self.schedule)); group } From adfd97e1122e6a152f1a300d0c8c527126622de3 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:29:57 +0700 Subject: [PATCH 50/68] Make DefaultTweenPlugins::schedule field public --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3de1909..1230396 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -431,7 +431,7 @@ where TimeCtx: Default + Send + Sync + 'static, { /// The schedule to register all default systems in - schedule: InternedScheduleLabel, + pub schedule: InternedScheduleLabel, /// Enable debug information and warnings. /// /// This currently is passed to [`bevy_time_runner::TimeRunnerPlugin::enable_debug`] field. From b052dccd83dc87fe2f1a95f2509e970973190980 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:30:32 +0700 Subject: [PATCH 51/68] Update docs for DefaultTweenPlugins --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1230396..c924cc3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -430,7 +430,7 @@ pub struct DefaultTweenPlugins where TimeCtx: Default + Send + Sync + 'static, { - /// The schedule to register all default systems in + /// Register all systems from this plugin to the specified schedule. pub schedule: InternedScheduleLabel, /// Enable debug information and warnings. /// @@ -485,7 +485,7 @@ impl DefaultTweenPlugins where TimeCtx: Default + Send + Sync + 'static, { - /// Constructor for schedule + /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { marker: PhantomData::default(), From c38070f590bf42e51d2c0e8d0492ae51fad8d1e5 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:32:46 +0700 Subject: [PATCH 52/68] clippy fix --- src/interpolate.rs | 4 ++-- src/interpolation.rs | 4 ++-- src/lib.rs | 8 ++++---- src/tween_event.rs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index afc55ab..0ea2d89 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -305,7 +305,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } @@ -400,7 +400,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } diff --git a/src/interpolation.rs b/src/interpolation.rs index 93eeef9..cfd4a6c 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -51,7 +51,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } @@ -456,7 +456,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } diff --git a/src/lib.rs b/src/lib.rs index c924cc3..a7c289c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -488,7 +488,7 @@ where /// Register all systems from this plugin to the specified schedule. pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { - marker: PhantomData::default(), + marker: PhantomData, schedule, ..default() } @@ -502,7 +502,7 @@ where Self { schedule: PostUpdate.intern(), enable_debug: true, - marker: PhantomData::default(), + marker: PhantomData, } } } @@ -578,7 +578,7 @@ where /// Constructor for schedule pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { - marker: PhantomData::default(), + marker: PhantomData, schedule, ..default() } @@ -592,7 +592,7 @@ where Self { schedule: PostUpdate.intern(), enable_debug: true, - marker: PhantomData::default(), + marker: PhantomData, } } } diff --git a/src/tween_event.rs b/src/tween_event.rs index fcc97e3..4e512e4 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -57,7 +57,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } @@ -117,7 +117,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } From fa80ec3ee41d6f80895b92a3a236cc870a03d2f4 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:33:42 +0700 Subject: [PATCH 53/68] Make DefaultTweenPlugins only impl Default for DefaultTweenPlugins<()> --- src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a7c289c..ea806ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -490,14 +490,12 @@ where Self { marker: PhantomData, schedule, - ..default() + enable_debug: true, } } } -impl Default for DefaultTweenPlugins -where - TimeCtx: Default + Send + Sync + 'static, -{ + +impl Default for DefaultTweenPlugins<()> { fn default() -> Self { Self { schedule: PostUpdate.intern(), From 4458da33d1e3567e4170d1f91cf2476a3d063362 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:36:24 +0700 Subject: [PATCH 54/68] Make *_with_time_context systems public --- src/tween.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tween.rs b/src/tween.rs index 014c86a..bbb9a63 100644 --- a/src/tween.rs +++ b/src/tween.rs @@ -224,11 +224,12 @@ pub use systems::{ }; pub use systems::{ apply_component_tween_system, component_dyn_tween_system, - component_tween_system, component_tween_system_with_time_context, + component_dyn_tween_system_with_time_context, component_tween_system, + component_tween_system_with_time_context, }; pub use systems::{ apply_resource_tween_system, resource_dyn_tween_system, - resource_tween_system, + resource_tween_system, resource_tween_system_with_time_context, }; /// Skip a tween from tweening. From 63682e7b4416281170fc8687cfce1cc26bda6a88 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:42:03 +0700 Subject: [PATCH 55/68] Manually impl Resource for TweenAppResource to hide deprecation warning --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ea806ad..06921ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -507,7 +507,7 @@ impl Default for DefaultTweenPlugins<()> { /// This resource will be used while initializing tween plugin and systems. /// [`BevyTweenRegisterSystems`] for example. -#[derive(Resource, Clone)] +#[derive(Clone)] #[deprecated( // TODO: since = "...", note = "This resource became less practical after generic_time_context (#78) PR" @@ -518,6 +518,9 @@ pub struct TweenAppResource { pub schedule: InternedScheduleLabel, } +#[allow(deprecated)] +impl Resource for TweenAppResource {} + #[allow(deprecated)] impl Default for TweenAppResource { fn default() -> Self { From bc8413674dea670546907a035d4dd2b193c83248 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:42:12 +0700 Subject: [PATCH 56/68] clippy fix --- src/interpolation/bevy_lookup_curve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index 504178a..bc69961 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -32,7 +32,7 @@ where pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { Self { schedule, - marker: PhantomData::default(), + marker: PhantomData, } } } From de7a95a6b484cc95323a5d408f6e4faba41025ed Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:44:01 +0700 Subject: [PATCH 57/68] Remove DefaultTweenPluginsOnDefaultTime --- src/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 06921ec..b39be86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -405,8 +405,6 @@ pub mod prelude { pub use crate::BevyTweenRegisterSystems; pub use crate::DefaultTweenPlugins; - - pub use crate::DefaultTweenPluginsOnDefaultTime; } #[cfg(feature = "bevy_asset")] @@ -422,9 +420,6 @@ pub use tween::resource_tween_system; pub use tween_event::tween_event_system; -/// The default tween plugins on default time context -pub type DefaultTweenPluginsOnDefaultTime = DefaultTweenPlugins<()>; - /// Default plugins for using crate. pub struct DefaultTweenPlugins where From 85a7c2068aa7973f5f350d0ff40b1dd0ab483446 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:45:51 +0700 Subject: [PATCH 58/68] Update plugin registration in examples --- examples/animation/banner_bounce.rs | 2 +- examples/animation/banner_triangle.rs | 2 +- examples/animation/thumbnail_triangle.rs | 5 +---- examples/bevy_lookup_curve.rs | 2 +- examples/demo/click.rs | 5 +---- examples/demo/delta_tweens.rs | 5 +---- examples/demo/entity_event.rs | 5 +---- examples/demo/event.rs | 5 +---- examples/demo/follow.rs | 2 +- examples/demo/hold.rs | 2 +- examples/demo/sprite_sheet.rs | 2 +- examples/entity_structure.rs | 5 +---- examples/interpolator.rs | 2 +- 13 files changed, 13 insertions(+), 31 deletions(-) diff --git a/examples/animation/banner_bounce.rs b/examples/animation/banner_bounce.rs index 5e7d4f7..0985f9f 100644 --- a/examples/animation/banner_bounce.rs +++ b/examples/animation/banner_bounce.rs @@ -35,7 +35,7 @@ fn main() { }), ..default() }), - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), )) .add_systems(Startup, (animation, setup_camera)) .run(); diff --git a/examples/animation/banner_triangle.rs b/examples/animation/banner_triangle.rs index 230affd..73a4924 100644 --- a/examples/animation/banner_triangle.rs +++ b/examples/animation/banner_triangle.rs @@ -20,7 +20,7 @@ fn main() { }), ..Default::default() }), - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), )) .add_systems(Startup, setup) .run(); diff --git a/examples/animation/thumbnail_triangle.rs b/examples/animation/thumbnail_triangle.rs index 512d8cc..47b3091 100644 --- a/examples/animation/thumbnail_triangle.rs +++ b/examples/animation/thumbnail_triangle.rs @@ -10,10 +10,7 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins(( - DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, setup) .run(); } diff --git a/examples/bevy_lookup_curve.rs b/examples/bevy_lookup_curve.rs index 0214ade..4099461 100644 --- a/examples/bevy_lookup_curve.rs +++ b/examples/bevy_lookup_curve.rs @@ -16,7 +16,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), EguiPlugin::default(), LookupCurvePlugin, )) diff --git a/examples/demo/click.rs b/examples/demo/click.rs index ceefc47..9c3d8c6 100644 --- a/examples/demo/click.rs +++ b/examples/demo/click.rs @@ -14,10 +14,7 @@ fn secs(secs: f32) -> Duration { fn main() { App::new() - .add_plugins(( - DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, setup) .add_systems( Update, diff --git a/examples/demo/delta_tweens.rs b/examples/demo/delta_tweens.rs index 8347d37..00c61e3 100644 --- a/examples/demo/delta_tweens.rs +++ b/examples/demo/delta_tweens.rs @@ -11,10 +11,7 @@ fn secs(secs: f32) -> Duration { fn main() { App::new() - .add_plugins(( - DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, (setup, spawn_circle_with_tweens)) .run(); } diff --git a/examples/demo/entity_event.rs b/examples/demo/entity_event.rs index 7de26f6..0d350d2 100644 --- a/examples/demo/entity_event.rs +++ b/examples/demo/entity_event.rs @@ -7,10 +7,7 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins(( - MinimalPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((MinimalPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, setup) .add_observer(|trigger: On>| { println!("TweenEvent: {}", trigger.data) diff --git a/examples/demo/event.rs b/examples/demo/event.rs index 3f11a8b..4505cee 100644 --- a/examples/demo/event.rs +++ b/examples/demo/event.rs @@ -9,10 +9,7 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins(( - DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, setup) .add_systems(Update, (effect_system, despawn_effect_system)) .run(); diff --git a/examples/demo/follow.rs b/examples/demo/follow.rs index 345d662..ca6ce1f 100644 --- a/examples/demo/follow.rs +++ b/examples/demo/follow.rs @@ -20,7 +20,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), EguiPlugin::default(), ResourceInspectorPlugin::::new(), )) diff --git a/examples/demo/hold.rs b/examples/demo/hold.rs index dfdaf05..846dde9 100644 --- a/examples/demo/hold.rs +++ b/examples/demo/hold.rs @@ -60,7 +60,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), interpolate::custom_interpolators_plugin, )) .add_systems(Startup, setup) diff --git a/examples/demo/sprite_sheet.rs b/examples/demo/sprite_sheet.rs index 01dd755..02f9881 100644 --- a/examples/demo/sprite_sheet.rs +++ b/examples/demo/sprite_sheet.rs @@ -46,7 +46,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins.set(ImagePlugin::default_nearest()), - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), interpolate::custom_interpolators_plugin, )) .add_systems(Startup, setup) diff --git a/examples/entity_structure.rs b/examples/entity_structure.rs index e98ac40..1246ac1 100644 --- a/examples/entity_structure.rs +++ b/examples/entity_structure.rs @@ -8,10 +8,7 @@ use bevy_tween::{ fn main() { App::new() - .add_plugins(( - DefaultPlugins, - DefaultTweenPluginsOnDefaultTime::default(), - )) + .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) .add_systems(Startup, setup) .run(); } diff --git a/examples/interpolator.rs b/examples/interpolator.rs index 4ddb73e..8fd6f62 100644 --- a/examples/interpolator.rs +++ b/examples/interpolator.rs @@ -79,7 +79,7 @@ fn main() { App::new() .add_plugins(( MinimalPlugins, - DefaultTweenPluginsOnDefaultTime::default(), + DefaultTweenPlugins::default(), interpolate::interpolators_plugin, )) .add_systems(Startup, setup) From 1f377729ec64ec8e7de4875e8c25cdc4bcc08a18 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:46:41 +0700 Subject: [PATCH 59/68] Refactor --- examples/demo/click.rs | 79 +++++++++++++++++------------------ examples/demo/sprite_sheet.rs | 2 - 2 files changed, 39 insertions(+), 42 deletions(-) diff --git a/examples/demo/click.rs b/examples/demo/click.rs index 9c3d8c6..58fe3ee 100644 --- a/examples/demo/click.rs +++ b/examples/demo/click.rs @@ -40,46 +40,45 @@ fn click_spawn_circle( ) { use interpolate::sprite_color; let circle_filled_image = asset_server.load("circle_filled.png"); - if let Some(coord) = coord.0 { - if key.just_pressed(MouseButton::Left) - || key.pressed(MouseButton::Right) - { - let start = Vec3::new(coord.x, coord.y, 1.); - let end = Vec3::new(0., 0., 0.); - let transform = Transform::from_translation(start); - let circle = AnimationTarget.into_target(); - let mut circle_transform = circle.transform_state(transform); - commands - .spawn(( - Sprite { - image: circle_filled_image, - ..default() - }, - transform, - AnimationTarget, - )) - .animation() - .insert(parallel(( - tween( - secs(2.), - EaseKind::ExponentialOut, - circle_transform.translation_to(end), - ), - tween( - secs(1.), - EaseKind::BackIn, - circle_transform.scale_to(Vec3::ZERO), - ), - tween( - secs(1.), - EaseKind::Linear, - circle.with(sprite_color( - into_color(WHITE), - into_color(DEEP_PINK), - )), - ), - ))); - } + if let Some(coord) = coord.0 + && (key.just_pressed(MouseButton::Left) + || key.pressed(MouseButton::Right)) + { + let start = Vec3::new(coord.x, coord.y, 1.); + let end = Vec3::new(0., 0., 0.); + let transform = Transform::from_translation(start); + let circle = AnimationTarget.into_target(); + let mut circle_transform = circle.transform_state(transform); + commands + .spawn(( + Sprite { + image: circle_filled_image, + ..default() + }, + transform, + AnimationTarget, + )) + .animation() + .insert(parallel(( + tween( + secs(2.), + EaseKind::ExponentialOut, + circle_transform.translation_to(end), + ), + tween( + secs(1.), + EaseKind::BackIn, + circle_transform.scale_to(Vec3::ZERO), + ), + tween( + secs(1.), + EaseKind::Linear, + circle.with(sprite_color( + into_color(WHITE), + into_color(DEEP_PINK), + )), + ), + ))); } } diff --git a/examples/demo/sprite_sheet.rs b/examples/demo/sprite_sheet.rs index 02f9881..c335a6c 100644 --- a/examples/demo/sprite_sheet.rs +++ b/examples/demo/sprite_sheet.rs @@ -5,8 +5,6 @@ mod interpolate { use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; use bevy_tween::prelude::*; - pub use bevy_tween::interpolate::*; - pub fn custom_interpolators_plugin(app: &mut App) { app.add_tween_systems( PostUpdate.intern(), From 820abc88aa5a5185991d371eedf1578f7768bce2 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 20:57:29 +0700 Subject: [PATCH 60/68] [!Breaking] Merge AnimationBuilderExt with AnimationBuilderExtGeneric + rustfmt format something Rename `animation_for_time_context` to `animation_in_time_context` --- src/combinator.rs | 712 +++++++++++++++++++++++----------------------- 1 file changed, 353 insertions(+), 359 deletions(-) diff --git a/src/combinator.rs b/src/combinator.rs index 72a76ba..8a2a718 100644 --- a/src/combinator.rs +++ b/src/combinator.rs @@ -1,359 +1,353 @@ -//! Combinator framework - -use std::time::Duration; - -use bevy::{ecs::system::EntityCommands, prelude::*}; -use bevy_time_runner::{ - Repeat, RepeatStyle, SkipTimeRunner, TimeContext, TimeDirection, - TimeRunner, TimeSpan, -}; - -mod animation_combinators; -mod state; -pub use animation_combinators::*; -pub use state::{TargetState, TransformTargetState, TransformTargetStateExt}; - -/// Commands to use within an animation combinator -pub struct AnimationCommands<'r, 'a> { - child_builder: &'r mut ChildSpawnerCommands<'a>, -} - -impl<'r, 'a> AnimationCommands<'r, 'a> { - pub(crate) fn new( - child_builder: &'r mut ChildSpawnerCommands<'a>, - ) -> AnimationCommands<'r, 'a> { - AnimationCommands { child_builder } - } - - /// Spawn an entity as a child. - /// Currently always spawn as a child of animation root that should contains [`bevy_time_runner::TimeRunner`]. - pub fn spawn(&mut self, bundle: impl Bundle) -> EntityCommands<'_> { - self.child_builder.spawn(bundle) - } -} - -/// Extension trait for types that can be used to make an animation. -pub trait AnimationBuilderExt { - /// Construct [`AnimationBuilder`] from [`Self`] - fn animation(&mut self) -> AnimationBuilder<'_>; -} - -/// Extension trait for types that can be used to make an animation. -pub trait AnimationBuilderExtGeneric { - /// Construct [`AnimationBuilder`] from [`Self`] - fn animation_for_time_context( - &mut self, - ) -> AnimationBuilder<'_, TimeCtx> - where - TimeCtx: Default + Send + Sync + 'static; -} - -impl AnimationBuilderExtGeneric for EntityCommands<'_> { - /// Construct [`AnimationBuilder`] from [`EntityCommands`]. - /// Use this entity as the animator. - /// Tweens will be spawned as children of this entity. - fn animation_for_time_context( - &mut self, - ) -> AnimationBuilder<'_, TimeCtx> - where - TimeCtx: Default + Send + Sync + 'static, - { - AnimationBuilder::new(self.reborrow()) - } -} -impl AnimationBuilderExt for EntityCommands<'_> { - /// Construct [`AnimationBuilder`] from [`EntityCommands`]. - /// Use this entity as the animator. - /// Tweens will be spawned as children of this entity. - fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_time_context() - } -} - -impl AnimationBuilderExtGeneric for Commands<'_, '_> { - /// Construct [`AnimationBuilder`] from [`Commands`]. - /// This will automatically spawn an entity as the animator. - fn animation_for_time_context( - &mut self, - ) -> AnimationBuilder<'_, TimeCtx> - where - TimeCtx: Default + Send + Sync + 'static, - { - AnimationBuilder::new(self.spawn_empty()) - } -} -impl AnimationBuilderExt for Commands<'_, '_> { - /// Construct [`AnimationBuilder`] from [`Commands`]. - /// This will automatically spawn an entity as the animator. - fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_time_context() - } -} - -impl AnimationBuilderExtGeneric for ChildSpawnerCommands<'_> { - /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. - /// This will automatically spawn a child entity as the animator. - fn animation_for_time_context( - &mut self, - ) -> AnimationBuilder<'_, TimeCtx> - where - TimeCtx: Default + Send + Sync + 'static, - { - AnimationBuilder::new(self.spawn_empty()) - } -} -impl AnimationBuilderExt for ChildSpawnerCommands<'_> { - /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. - /// This will automatically spawn a child entity as the animator. - fn animation(&mut self) -> AnimationBuilder<'_> { - self.animation_for_time_context() - } -} - -/// Configure [`TimeRunner`] through a builder API and add animation entities -pub struct AnimationBuilder<'a, TimeCtx = ()> -where - TimeCtx: Default + Send + Sync + 'static, -{ - entity_commands: EntityCommands<'a>, - time_runner: Option, - time_context_marker: Option>, - custom_length: Option, - skipped: bool, -} -impl<'a, TimeCtx> AnimationBuilder<'a, TimeCtx> -where - TimeCtx: Default + Send + Sync + 'static, -{ - /// Create new [`AnimationBuilder`] - pub fn new( - entity_commands: EntityCommands<'a>, - ) -> AnimationBuilder<'a, TimeCtx> { - AnimationBuilder { - entity_commands, - time_runner: None, - time_context_marker: None, - custom_length: None, - skipped: false, - } - } - - /// Get the inner [`EntityCommands`] - pub fn entity_commands(&mut self) -> &mut EntityCommands<'a> { - &mut self.entity_commands - } - - /// Get the inner building [`TimeRunner`] - pub fn time_runner(&self) -> &Option { - &self.time_runner - } - - /// Get the inner building [`TimeRunner`] mutably - pub fn time_runner_mut(&mut self) -> &mut Option { - &mut self.time_runner - } - - /// Configure [`TimeRunner`]'s [`Repeat`] - pub fn repeat(mut self, repeat: Repeat) -> Self { - let time_runner = self.time_runner_or_default(); - match TimeRunner::repeat(time_runner) { - Some((_, repeat_style)) => { - time_runner.set_repeat(Some((repeat, repeat_style))); - } - None => { - time_runner.set_repeat(Some((repeat, RepeatStyle::default()))); - } - } - self - } - - /// Configure [`TimeRunner`]'s [`RepeatStyle`] - pub fn repeat_style(mut self, repeat_style: RepeatStyle) -> Self { - let time_runner = self.time_runner_or_default(); - match TimeRunner::repeat(time_runner) { - Some((repeat, _)) => { - time_runner.set_repeat(Some((repeat, repeat_style))); - } - None => { - time_runner - .set_repeat(Some((Repeat::Infinitely, repeat_style))); - } - } - self - } - - /// Configure [`TimeRunner`]'s `paused`. Note that pausing only pauses the timer - /// but not the animation it self. - pub fn paused(mut self, paused: bool) -> Self { - self.time_runner_or_default().set_paused(paused); - self - } - - /// Skip [`TimeRunner`] from inserting [`TimeSpanProgress`](bevy_time_runner::TimeSpanProgress) which is a signal - /// for an animation entity to execute animation code. - pub fn skipped(mut self, skipped: bool) -> Self { - self.skipped = skipped; - self - } - - /// [`Self::paused`] and [`Self::skipped`] - pub fn disabled(self, disabled: bool) -> Self { - self.paused(disabled).skipped(disabled) - } - - /// Use custom duration instead of determined by [`insert`](Self::insert). - pub fn length(mut self, duration: Duration) -> Self { - self.custom_length = Some(duration); - self - } - - /// Configure [`TimeRunner`]'s time scale to adjust animation speed. - /// Negative scale cause animation play in the opposite of [`TimeDirection`] and - /// [`Repeat`] counter will tick backward. - pub fn time_scale(mut self, scale: f32) -> Self { - self.time_runner_or_default().set_time_scale(scale); - self - } - - /// Configure [`TimeRunner`]'s direction to play animation backward or forward. - pub fn direction(mut self, direction: TimeDirection) -> Self { - self.time_runner_or_default().set_direction(direction); - self - } - - fn time_runner_or_default(&mut self) -> &mut TimeRunner { - self.time_runner.get_or_insert_with(TimeRunner::default) - } - - /// Add animations from a closure. Animation entities will be subjected - /// as a children of this entity. - /// [`TimeRunner`]'s length is determined by last `&mut Duration` value unless use - /// [`Self::length`]. - /// It's also possible to use combinator like [`go`], [`forward`], and [`backward`] - /// as the last combinator to customize the length. - pub fn insert(self, animation: F) -> EntityCommands<'a> - where - F: FnOnce(&mut AnimationCommands, &mut Duration), - { - let AnimationBuilder { - mut entity_commands, - time_runner, - time_context_marker, - custom_length, - skipped, - } = self; - let mut dur = Duration::ZERO; - entity_commands.with_children(|c| { - let mut a = AnimationCommands::new(c); - animation(&mut a, &mut dur); - }); - let mut time_runner = time_runner.unwrap_or_default(); - match custom_length { - Some(length) => { - time_runner.set_length(length); - } - None => { - time_runner.set_length(dur); - } - } - entity_commands - .insert((time_runner, time_context_marker.unwrap_or_default())); - if skipped { - entity_commands.insert(SkipTimeRunner); - } - entity_commands - } - - /// Insert tween components directly to this entity. - /// Can be used to create a simple animation quickly. - /// [`TimeRunner`]'s length is determined by provided `duration` unless use - /// [`Self::length`] - pub fn insert_tween_here( - self, - duration: Duration, - interpolation: I, - tweens: T, - ) -> EntityCommands<'a> - where - I: Bundle, - T: Bundle, - { - let AnimationBuilder { - mut entity_commands, - time_runner, - time_context_marker, - custom_length, - skipped, - } = self; - let mut time_runner = time_runner.unwrap_or_default(); - match custom_length { - Some(length) => { - time_runner.set_length(length); - } - None => { - time_runner.set_length(duration); - } - } - - entity_commands.insert(( - TimeSpan::try_from(Duration::ZERO..duration).unwrap(), - interpolation, - tweens, - time_runner, - time_context_marker.unwrap_or_default(), - )); - if skipped { - entity_commands.insert(SkipTimeRunner); - } - entity_commands - } - - /// Insert tween components directly to this entity. - /// Can be used to create a simple animation quickly. - /// [`TimeRunner`]'s length is determined by provided `duration` unless use - /// [`Self::length`] - /// - /// # Note - /// - /// If the entity does not exist when this command is executed, - /// the resulting error will be ignored. - pub fn try_insert_tween_here( - self, - duration: Duration, - interpolation: I, - tweens: T, - ) -> EntityCommands<'a> - where - I: Bundle, - T: Bundle, - { - let AnimationBuilder { - mut entity_commands, - time_runner, - time_context_marker, - custom_length, - skipped, - } = self; - let mut time_runner = time_runner.unwrap_or_default(); - match custom_length { - Some(length) => { - time_runner.set_length(length); - } - None => { - time_runner.set_length(duration); - } - } - - entity_commands.try_insert(( - TimeSpan::try_from(Duration::ZERO..duration).unwrap(), - interpolation, - tweens, - time_runner, - time_context_marker.unwrap_or_default(), - )); - if skipped { - entity_commands.try_insert(SkipTimeRunner); - } - entity_commands - } -} +//! Combinator framework + +use std::time::Duration; + +use bevy::{ecs::system::EntityCommands, prelude::*}; +use bevy_time_runner::{ + Repeat, RepeatStyle, SkipTimeRunner, TimeContext, TimeDirection, + TimeRunner, TimeSpan, +}; + +mod animation_combinators; +mod state; +pub use animation_combinators::*; +pub use state::{TargetState, TransformTargetState, TransformTargetStateExt}; + +/// Commands to use within an animation combinator +pub struct AnimationCommands<'r, 'a> { + child_builder: &'r mut ChildSpawnerCommands<'a>, +} + +impl<'r, 'a> AnimationCommands<'r, 'a> { + pub(crate) fn new( + child_builder: &'r mut ChildSpawnerCommands<'a>, + ) -> AnimationCommands<'r, 'a> { + AnimationCommands { child_builder } + } + + /// Spawn an entity as a child. + /// Currently always spawn as a child of animation root that should contains [`bevy_time_runner::TimeRunner`]. + pub fn spawn(&mut self, bundle: impl Bundle) -> EntityCommands<'_> { + self.child_builder.spawn(bundle) + } +} + +/// Extension trait for types that can be used to make an animation. +pub trait AnimationBuilderExt { + /// Construct [`AnimationBuilder`] from [`Self`] + fn animation(&mut self) -> AnimationBuilder<'_>; + + /// Construct [`AnimationBuilder`] from [`Self`] within the specified time context. + fn animation_in_time_context( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static; +} + +impl AnimationBuilderExt for EntityCommands<'_> { + /// Construct [`AnimationBuilder`] from [`EntityCommands`]. + /// Use this entity as the animator. + /// Tweens will be spawned as children of this entity. + fn animation(&mut self) -> AnimationBuilder<'_> { + self.animation_in_time_context() + } + + /// Construct [`AnimationBuilder`] from [`EntityCommands`]. + /// Use this entity as the animator. + /// Tweens will be spawned as children of this entity and only runs within the specified time context. + fn animation_in_time_context( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.reborrow()) + } +} + +impl AnimationBuilderExt for Commands<'_, '_> { + /// Construct [`AnimationBuilder`] from [`Commands`]. + /// This will automatically spawn an entity as the animator. + fn animation(&mut self) -> AnimationBuilder<'_> { + self.animation_in_time_context() + } + + /// Construct [`AnimationBuilder`] from [`Commands`]. + /// This will automatically spawn an entity as the animator and only runs within the specified time context. + fn animation_in_time_context( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.spawn_empty()) + } +} + +impl AnimationBuilderExt for ChildSpawnerCommands<'_> { + /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. + /// This will automatically spawn a child entity as the animator. + fn animation(&mut self) -> AnimationBuilder<'_> { + self.animation_in_time_context() + } + + /// Construct [`AnimationBuilder`] from [`ChildSpawnerCommands`]. + /// This will automatically spawn a child entity as the animator and only runs within the specified time context. + fn animation_in_time_context( + &mut self, + ) -> AnimationBuilder<'_, TimeCtx> + where + TimeCtx: Default + Send + Sync + 'static, + { + AnimationBuilder::new(self.spawn_empty()) + } +} + +/// Configure [`TimeRunner`] through a builder API and add animation entities +pub struct AnimationBuilder<'a, TimeCtx = ()> +where + TimeCtx: Default + Send + Sync + 'static, +{ + entity_commands: EntityCommands<'a>, + time_runner: Option, + time_context_marker: Option>, + custom_length: Option, + skipped: bool, +} +impl<'a, TimeCtx> AnimationBuilder<'a, TimeCtx> +where + TimeCtx: Default + Send + Sync + 'static, +{ + /// Create new [`AnimationBuilder`] + pub fn new( + entity_commands: EntityCommands<'a>, + ) -> AnimationBuilder<'a, TimeCtx> { + AnimationBuilder { + entity_commands, + time_runner: None, + time_context_marker: None, + custom_length: None, + skipped: false, + } + } + + /// Get the inner [`EntityCommands`] + pub fn entity_commands(&mut self) -> &mut EntityCommands<'a> { + &mut self.entity_commands + } + + /// Get the inner building [`TimeRunner`] + pub fn time_runner(&self) -> &Option { + &self.time_runner + } + + /// Get the inner building [`TimeRunner`] mutably + pub fn time_runner_mut(&mut self) -> &mut Option { + &mut self.time_runner + } + + /// Configure [`TimeRunner`]'s [`Repeat`] + pub fn repeat(mut self, repeat: Repeat) -> Self { + let time_runner = self.time_runner_or_default(); + match TimeRunner::repeat(time_runner) { + Some((_, repeat_style)) => { + time_runner.set_repeat(Some((repeat, repeat_style))); + } + None => { + time_runner.set_repeat(Some((repeat, RepeatStyle::default()))); + } + } + self + } + + /// Configure [`TimeRunner`]'s [`RepeatStyle`] + pub fn repeat_style(mut self, repeat_style: RepeatStyle) -> Self { + let time_runner = self.time_runner_or_default(); + match TimeRunner::repeat(time_runner) { + Some((repeat, _)) => { + time_runner.set_repeat(Some((repeat, repeat_style))); + } + None => { + time_runner + .set_repeat(Some((Repeat::Infinitely, repeat_style))); + } + } + self + } + + /// Configure [`TimeRunner`]'s `paused`. Note that pausing only pauses the timer + /// but not the animation it self. + pub fn paused(mut self, paused: bool) -> Self { + self.time_runner_or_default().set_paused(paused); + self + } + + /// Skip [`TimeRunner`] from inserting [`TimeSpanProgress`](bevy_time_runner::TimeSpanProgress) which is a signal + /// for an animation entity to execute animation code. + pub fn skipped(mut self, skipped: bool) -> Self { + self.skipped = skipped; + self + } + + /// [`Self::paused`] and [`Self::skipped`] + pub fn disabled(self, disabled: bool) -> Self { + self.paused(disabled).skipped(disabled) + } + + /// Use custom duration instead of determined by [`insert`](Self::insert). + pub fn length(mut self, duration: Duration) -> Self { + self.custom_length = Some(duration); + self + } + + /// Configure [`TimeRunner`]'s time scale to adjust animation speed. + /// Negative scale cause animation play in the opposite of [`TimeDirection`] and + /// [`Repeat`] counter will tick backward. + pub fn time_scale(mut self, scale: f32) -> Self { + self.time_runner_or_default().set_time_scale(scale); + self + } + + /// Configure [`TimeRunner`]'s direction to play animation backward or forward. + pub fn direction(mut self, direction: TimeDirection) -> Self { + self.time_runner_or_default().set_direction(direction); + self + } + + fn time_runner_or_default(&mut self) -> &mut TimeRunner { + self.time_runner.get_or_insert_with(TimeRunner::default) + } + + /// Add animations from a closure. Animation entities will be subjected + /// as a children of this entity. + /// [`TimeRunner`]'s length is determined by last `&mut Duration` value unless use + /// [`Self::length`]. + /// It's also possible to use combinator like [`go`], [`forward`], and [`backward`] + /// as the last combinator to customize the length. + pub fn insert(self, animation: F) -> EntityCommands<'a> + where + F: FnOnce(&mut AnimationCommands, &mut Duration), + { + let AnimationBuilder { + mut entity_commands, + time_runner, + time_context_marker, + custom_length, + skipped, + } = self; + let mut dur = Duration::ZERO; + entity_commands.with_children(|c| { + let mut a = AnimationCommands::new(c); + animation(&mut a, &mut dur); + }); + let mut time_runner = time_runner.unwrap_or_default(); + match custom_length { + Some(length) => { + time_runner.set_length(length); + } + None => { + time_runner.set_length(dur); + } + } + entity_commands + .insert((time_runner, time_context_marker.unwrap_or_default())); + if skipped { + entity_commands.insert(SkipTimeRunner); + } + entity_commands + } + + /// Insert tween components directly to this entity. + /// Can be used to create a simple animation quickly. + /// [`TimeRunner`]'s length is determined by provided `duration` unless use + /// [`Self::length`] + pub fn insert_tween_here( + self, + duration: Duration, + interpolation: I, + tweens: T, + ) -> EntityCommands<'a> + where + I: Bundle, + T: Bundle, + { + let AnimationBuilder { + mut entity_commands, + time_runner, + time_context_marker, + custom_length, + skipped, + } = self; + let mut time_runner = time_runner.unwrap_or_default(); + match custom_length { + Some(length) => { + time_runner.set_length(length); + } + None => { + time_runner.set_length(duration); + } + } + + entity_commands.insert(( + TimeSpan::try_from(Duration::ZERO..duration).unwrap(), + interpolation, + tweens, + time_runner, + time_context_marker.unwrap_or_default(), + )); + if skipped { + entity_commands.insert(SkipTimeRunner); + } + entity_commands + } + + /// Insert tween components directly to this entity. + /// Can be used to create a simple animation quickly. + /// [`TimeRunner`]'s length is determined by provided `duration` unless use + /// [`Self::length`] + /// + /// # Note + /// + /// If the entity does not exist when this command is executed, + /// the resulting error will be ignored. + pub fn try_insert_tween_here( + self, + duration: Duration, + interpolation: I, + tweens: T, + ) -> EntityCommands<'a> + where + I: Bundle, + T: Bundle, + { + let AnimationBuilder { + mut entity_commands, + time_runner, + time_context_marker, + custom_length, + skipped, + } = self; + let mut time_runner = time_runner.unwrap_or_default(); + match custom_length { + Some(length) => { + time_runner.set_length(length); + } + None => { + time_runner.set_length(duration); + } + } + + entity_commands.try_insert(( + TimeSpan::try_from(Duration::ZERO..duration).unwrap(), + interpolation, + tweens, + time_runner, + time_context_marker.unwrap_or_default(), + )); + if skipped { + entity_commands.try_insert(SkipTimeRunner); + } + entity_commands + } +} From 6bfe90ee9679a4198677b29643dfed479c01e7b7 Mon Sep 17 00:00:00 2001 From: Multirious Date: Sun, 1 Mar 2026 21:00:10 +0700 Subject: [PATCH 61/68] Update time_context_animation example --- examples/demo/time_context_animation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo/time_context_animation.rs b/examples/demo/time_context_animation.rs index dca6fbf..67f551d 100644 --- a/examples/demo/time_context_animation.rs +++ b/examples/demo/time_context_animation.rs @@ -42,7 +42,7 @@ fn spawn_circle_with_tweens( )); circle_commands - .animation_for_time_context::() + .animation_in_time_context::() .repeat(Repeat::Infinitely) .repeat_style(RepeatStyle::PingPong) .insert(tween( From 309a3ca03726355bc4d5b5ba34834fa729662508 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:11:48 +0700 Subject: [PATCH 62/68] Update CHANGELOG.md --- CHANGELOG.md | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4ac833..153b961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,20 +2,30 @@ ## Unreleased - XXXX-XX-XX -Breaking: -- you'd now have to specify a schedule for `DefaultTweenPlugins` to run in using the `in_schedule` function - - For default usage, you could either manually write: `DefaultTweenPlugins::<()>::in_schedule(PostUpdate.intern())`, or use `DefaultTweenPluginsOnDefaultTime::default()` -- rename `TweenAppResource`'s `schedule` field to `default_schedule` now that there can be more -- add `enable_time_runner_debug` field to `TweenCorePlugin` -- Add `enable_debug` option to `TweenCorePlugin` by [#75](https://github.com/Multirious/bevy_tween/pull/75) -- Migrate to Bevy 0.18 by [#75](https://github.com/Multirious/bevy_tween/pull/75) - -- Add `animation_for_time_context()` for animation creation on different time steps (for example, `Fixed`) - - In order for tweens to work on a different time context, you have to register another instance of the `DefaultTweenPlugins`, for example: `DefaultTweenPlugins::::in_schedule(FixedLast.intern())`, see time_context_animation example - - You may also add events that will be checked on specific schedules using `TweenEventOnSchedulePlugin::::for_schedule([your_schedules_here])` - - Add `component_tween_system_with_time_context` which is the same as `component_tween_system` but the system has the specified `TimeCtx` - - Add `component_dyn_tween_system_with_time_context` which is the same as `component_dyn_tween_system` but the system has the specified `TimeCtx` - - Add `resource_tween_system_with_time_context` which is the same as `resource_tween_system` but the system has the specified `TimeCtx` +- Migrate to Bevy 0.18 by [#80](https://github.com/Multirious/bevy_tween/pull/80) + +- By [#78](https://github.com/Multirious/bevy_tween/pull/78) + Breaking: + - **All plugins** now have the generic parameter `TimeCtx` and field `schedule` with the method `in_schedule`. This is used to specify the time context and schedule to register all the systems in. + For example: + - `DefaultTweenPlugins::default()` remains default for `()` time context within `PostUpdate` schedule. + - `DefaultTweenPlugins::::in_schedule(FixedLast.intern())` for `Fixed` time context within `FixedLast` schedule. + - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library current make sure that all animation spawned through the framework automatically include this component, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. + - Add `enable_debug` field to `TweenCorePlugin`. + - Add `animation_in_time_context()` method to `AnimationBuilderExt` + - All tween systems has the generic parameter `TimeCtx` and changed query to only query for tweens entity with `TimeContext` component. + + Non-brekaing: + - Add `component_tween_system_with_time_context` which is the same as `component_tween_system` but has the generic parameter `TimeCtx` + - Add `component_dyn_tween_system_with_time_context` which is the same as `component_dyn_tween_system` but has the generic parameter `TimeCtx` + - Add `resource_tween_system_with_time_context` which is the same as `resource_tween_system` but has the generic parameter `TimeCtx` + + - Deprecated `TweenAppResource`. Though all plugins will continued to support it to remain compatible **except plugin groups**. + + Internal: + - Add `time_context_animation` example. + +Internal: - Update flake by [#77](https://github.com/Multirious/bevy_tween/pull/77) - Use latest instead of a version for stableRust in flake.nix - `nix flake update` From aaeab0379e3a130562060e5c741c38025842b191 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:17:28 +0700 Subject: [PATCH 63/68] typo --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 153b961..7133a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,11 @@ - By [#78](https://github.com/Multirious/bevy_tween/pull/78) Breaking: - - **All plugins** now have the generic parameter `TimeCtx` and field `schedule` with the method `in_schedule`. This is used to specify the time context and schedule to register all the systems in. + - **All plugins** now have the generic parameter `TimeCtx` and field `schedule` with the constructor `in_schedule`. This is used to specify the time context and schedule to register all the systems in. For example: - `DefaultTweenPlugins::default()` remains default for `()` time context within `PostUpdate` schedule. - `DefaultTweenPlugins::::in_schedule(FixedLast.intern())` for `Fixed` time context within `FixedLast` schedule. - - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library current make sure that all animation spawned through the framework automatically include this component, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. + - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library currently make sure that all animation spawned through the framework automatically includes this component, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. - Add `enable_debug` field to `TweenCorePlugin`. - Add `animation_in_time_context()` method to `AnimationBuilderExt` - All tween systems has the generic parameter `TimeCtx` and changed query to only query for tweens entity with `TimeContext` component. @@ -22,7 +22,7 @@ - Deprecated `TweenAppResource`. Though all plugins will continued to support it to remain compatible **except plugin groups**. - Internal: + Example: - Add `time_context_animation` example. Internal: From 55058ad28114d7013deb1db9d07a784a984c2ddd Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:35:16 +0700 Subject: [PATCH 64/68] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7133a95..8e5a36b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,9 @@ For example: - `DefaultTweenPlugins::default()` remains default for `()` time context within `PostUpdate` schedule. - `DefaultTweenPlugins::::in_schedule(FixedLast.intern())` for `Fixed` time context within `FixedLast` schedule. - - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library currently make sure that all animation spawned through the framework automatically includes this component, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. + - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library currently make sure that all animation spawned through **the framework automatically includes this component**, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. - Add `enable_debug` field to `TweenCorePlugin`. + - `BevyTweenRegisterSystems::add_tween_systems` now expects `schedule` parameter. - Add `animation_in_time_context()` method to `AnimationBuilderExt` - All tween systems has the generic parameter `TimeCtx` and changed query to only query for tweens entity with `TimeContext` component. From bdf1046e3131f3ffcd184c4becb3e659b9a3faf2 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:46:00 +0700 Subject: [PATCH 65/68] Use impl ScheduleLabel instead of InternedScheduleLabel for function parameters --- src/interpolate.rs | 8 ++++---- src/interpolation.rs | 8 ++++---- src/interpolation/bevy_lookup_curve.rs | 4 ++-- src/lib.rs | 12 ++++++------ src/tween_event.rs | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/interpolate.rs b/src/interpolate.rs index 0ea2d89..70ee153 100644 --- a/src/interpolate.rs +++ b/src/interpolate.rs @@ -302,9 +302,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } @@ -397,9 +397,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } diff --git a/src/interpolation.rs b/src/interpolation.rs index cfd4a6c..0cedd85 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -48,9 +48,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } @@ -453,9 +453,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } diff --git a/src/interpolation/bevy_lookup_curve.rs b/src/interpolation/bevy_lookup_curve.rs index bc69961..714f6cf 100644 --- a/src/interpolation/bevy_lookup_curve.rs +++ b/src/interpolation/bevy_lookup_curve.rs @@ -29,9 +29,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } diff --git a/src/lib.rs b/src/lib.rs index b39be86..ce2b7ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -481,10 +481,10 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { marker: PhantomData, - schedule, + schedule: schedule.intern(), enable_debug: true, } } @@ -572,10 +572,10 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Constructor for schedule - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { marker: PhantomData, - schedule, + schedule: schedule.intern(), ..default() } } @@ -639,7 +639,7 @@ pub trait BevyTweenRegisterSystems { /// Register tween systems fn add_tween_systems( &mut self, - schedule: InternedScheduleLabel, + schedule: impl ScheduleLabel, tween_systems: impl IntoScheduleConfigs, ) -> &mut Self; } @@ -649,7 +649,7 @@ impl BevyTweenRegisterSystems for App { /// in set [`TweenSystemSet::ApplyTween`] fn add_tween_systems( &mut self, - schedule: InternedScheduleLabel, + schedule: impl ScheduleLabel, tween_systems: impl IntoScheduleConfigs, ) -> &mut Self { self.add_systems( diff --git a/src/tween_event.rs b/src/tween_event.rs index 4e512e4..830b0d1 100644 --- a/src/tween_event.rs +++ b/src/tween_event.rs @@ -54,9 +54,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } @@ -114,9 +114,9 @@ where TimeCtx: Default + Send + Sync + 'static, { /// Register all systems from this plugin to the specified schedule. - pub fn in_schedule(schedule: InternedScheduleLabel) -> Self { + pub fn in_schedule(schedule: impl ScheduleLabel) -> Self { Self { - schedule, + schedule: schedule.intern(), marker: PhantomData, } } From b794bc5b66c2ab0cac9d85ff410e005f7d28e635 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:48:02 +0700 Subject: [PATCH 66/68] Use schedule label directly without intern in examples --- CHANGELOG.md | 2 +- examples/demo/hold.rs | 4 ++-- examples/demo/sprite_sheet.rs | 4 ++-- examples/demo/time_context_animation.rs | 3 +-- examples/interpolator.rs | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5a36b..bdfa212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - **All plugins** now have the generic parameter `TimeCtx` and field `schedule` with the constructor `in_schedule`. This is used to specify the time context and schedule to register all the systems in. For example: - `DefaultTweenPlugins::default()` remains default for `()` time context within `PostUpdate` schedule. - - `DefaultTweenPlugins::::in_schedule(FixedLast.intern())` for `Fixed` time context within `FixedLast` schedule. + - `DefaultTweenPlugins::::in_schedule(FixedLast)` for `Fixed` time context within `FixedLast` schedule. - **ALL** animation will not run without `bevy_time_runner::TimeContext` marker component with the complementary plugin registered. This also apply to all children of the animation entity. The library currently make sure that all animation spawned through **the framework automatically includes this component**, but if you do insert any animation components manually, you will have to make sure to include TimeContext component. Consult the docs for more details. - Add `enable_debug` field to `TweenCorePlugin`. - `BevyTweenRegisterSystems::add_tween_systems` now expects `schedule` parameter. diff --git a/examples/demo/hold.rs b/examples/demo/hold.rs index 846dde9..bda3819 100644 --- a/examples/demo/hold.rs +++ b/examples/demo/hold.rs @@ -10,14 +10,14 @@ use bevy_tween::{bevy_time_runner::TimeRunner, prelude::*}; use rand::prelude::*; mod interpolate { - use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; + use bevy::prelude::*; use bevy_tween::{prelude::*, resource_tween_system}; pub use bevy_tween::interpolate::*; pub fn custom_interpolators_plugin(app: &mut App) { app.add_tween_systems( - PostUpdate.intern(), + PostUpdate, resource_tween_system::(), ); } diff --git a/examples/demo/sprite_sheet.rs b/examples/demo/sprite_sheet.rs index c335a6c..eb455db 100644 --- a/examples/demo/sprite_sheet.rs +++ b/examples/demo/sprite_sheet.rs @@ -2,12 +2,12 @@ use bevy::prelude::*; use bevy_tween::{prelude::*, tween::AnimationTarget}; mod interpolate { - use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; + use bevy::prelude::*; use bevy_tween::prelude::*; pub fn custom_interpolators_plugin(app: &mut App) { app.add_tween_systems( - PostUpdate.intern(), + PostUpdate, bevy_tween::component_tween_system::(), ); } diff --git a/examples/demo/time_context_animation.rs b/examples/demo/time_context_animation.rs index 67f551d..99ac1e8 100644 --- a/examples/demo/time_context_animation.rs +++ b/examples/demo/time_context_animation.rs @@ -1,4 +1,3 @@ -use bevy::ecs::schedule::ScheduleLabel; use bevy::prelude::*; use bevy_tween::{combinator::*, prelude::*, tween::AnimationTarget}; use std::time::Duration; @@ -11,7 +10,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - DefaultTweenPlugins::::in_schedule(FixedLast.intern()), + DefaultTweenPlugins::::in_schedule(FixedLast), )) .insert_resource(Time::::from_seconds(0.25)) .add_systems(Startup, (setup, spawn_circle_with_tweens)) diff --git a/examples/interpolator.rs b/examples/interpolator.rs index 8fd6f62..e468897 100644 --- a/examples/interpolator.rs +++ b/examples/interpolator.rs @@ -13,14 +13,14 @@ pub struct Circle { mod interpolate { use super::Circle; - use bevy::{ecs::schedule::ScheduleLabel, prelude::*}; + use bevy::prelude::*; use bevy_tween::{ component_dyn_tween_system, component_tween_system, prelude::*, }; pub fn interpolators_plugin(app: &mut App) { app.add_tween_systems( - PostUpdate.intern(), + PostUpdate, ( component_dyn_tween_system::(), component_tween_system::(), From 5d86978020657af4826d1363bc8e9e85f05397a5 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:53:24 +0700 Subject: [PATCH 67/68] Update doc examples --- src/lib.rs | 2 +- src/tween.rs | 15 +++++++++------ src/tween/systems.rs | 6 ++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ce2b7ba..2ba71cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ //! //! fn main() { //! App::default() -//! .add_plugins((DefaultPlugins, DefaultTweenPlugins)) +//! .add_plugins((DefaultPlugins, DefaultTweenPlugins::default())) //! .run(); //! } //! ``` diff --git a/src/tween.rs b/src/tween.rs index bbb9a63..c2cbc02 100644 --- a/src/tween.rs +++ b/src/tween.rs @@ -137,11 +137,14 @@ //! use bevy_tween::component_tween_system; //! use my_interpolate::*; //! -//! App::new().add_tween_systems(( -//! component_tween_system::(), -//! component_tween_system::(), -//! component_tween_system::(), -//! )); +//! App::new().add_tween_systems( +//! PostUpdate, +//! ( +//! component_tween_system::(), +//! component_tween_system::(), +//! component_tween_system::(), +//! ) +//! ); //! } //! # } //! ``` @@ -198,7 +201,7 @@ //! // One system to rule them all //! // Note that we're only using the `Foo` type, not `FooA`, `FooB`, //! // and `FooC`! -//! App::new().add_tween_systems(component_dyn_tween_system::()); +//! App::new().add_tween_systems(PostUpdate, component_dyn_tween_system::()); //! // `component_dyn_tween_system` is just an alias for //! // `component_tween_system::>>` //! } diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 58c42b4..4f129f4 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -115,11 +115,13 @@ impl core::fmt::Display for QueryEntityErrorWithoutWorld { /// /// // Generic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_component_tween_system::, /// ); /// /// // Dynamic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_component_tween_system::< /// BoxedInterpolator, /// >, @@ -338,6 +340,7 @@ where /// /// // Generic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_resource_tween_system::< /// InterpolateScreenFade, /// >, @@ -345,6 +348,7 @@ where /// /// // Dynamic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_resource_tween_system::< /// BoxedInterpolator, /// >, @@ -452,11 +456,13 @@ where /// /// // Generic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_asset_tween_system::, /// ); /// /// // Dynamic interpolator: /// app.add_tween_systems( +/// PostUpdate, /// bevy_tween::tween::apply_asset_tween_system::< /// BoxedInterpolator, /// >, From ad5a06ad845df98da719232651bf549a38d52858 Mon Sep 17 00:00:00 2001 From: Multirious Date: Tue, 3 Mar 2026 20:55:22 +0700 Subject: [PATCH 68/68] Update doc examples --- src/tween/systems.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tween/systems.rs b/src/tween/systems.rs index 4f129f4..96c45be 100644 --- a/src/tween/systems.rs +++ b/src/tween/systems.rs @@ -116,7 +116,7 @@ impl core::fmt::Display for QueryEntityErrorWithoutWorld { /// // Generic interpolator: /// app.add_tween_systems( /// PostUpdate, -/// bevy_tween::tween::apply_component_tween_system::, +/// bevy_tween::tween::apply_component_tween_system::, /// ); /// /// // Dynamic interpolator: @@ -124,6 +124,7 @@ impl core::fmt::Display for QueryEntityErrorWithoutWorld { /// PostUpdate, /// bevy_tween::tween::apply_component_tween_system::< /// BoxedInterpolator, +/// () /// >, /// ); /// } @@ -343,6 +344,7 @@ where /// PostUpdate, /// bevy_tween::tween::apply_resource_tween_system::< /// InterpolateScreenFade, +/// (), /// >, /// ); /// @@ -351,6 +353,7 @@ where /// PostUpdate, /// bevy_tween::tween::apply_resource_tween_system::< /// BoxedInterpolator, +/// (), /// >, /// ); /// } @@ -457,7 +460,7 @@ where /// // Generic interpolator: /// app.add_tween_systems( /// PostUpdate, -/// bevy_tween::tween::apply_asset_tween_system::, +/// bevy_tween::tween::apply_asset_tween_system::, /// ); /// /// // Dynamic interpolator: @@ -465,6 +468,7 @@ where /// PostUpdate, /// bevy_tween::tween::apply_asset_tween_system::< /// BoxedInterpolator, +/// (), /// >, /// ); /// }