Skip to content

Comments

Allow Use And Registration of Generic Time Contexts#78

Open
Rabbival wants to merge 39 commits intomainfrom
generic_time_context
Open

Allow Use And Registration of Generic Time Contexts#78
Rabbival wants to merge 39 commits intomainfrom
generic_time_context

Conversation

@Rabbival
Copy link
Collaborator

@Rabbival Rabbival commented Feb 5, 2026

Enable use and registration of specific time contexts and schedules. Such as animations that only run on FixedUpdate on Fixed time context.

Multirious and others added 12 commits February 4, 2026 21:21
now tweens can be registered to fire on specific schedules per time context (common use: only fire fixed-ticked tweens on fixed update)
so that curves would only be sampled when relevant, and always sampled when relevant
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)
by adding a generic constructor and having the previous constructor call it defaultly
* 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)
Rabbival and others added 17 commits February 5, 2026 12:55
This prevents unnecessary breaking changes.
(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.
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.
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`
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`
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`
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`
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`
* 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
* it now takes TimeCtx generic with default of ()
* on_schedule constructor has been renamed to in_schedule
* 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
* now there's only one main plugin
* rename TweenScheduleAndStepDependentPlugins and make it private as there's now no need to register it from outside
* 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
* add DefaultTweenPluginsOnDefaultTime for ease of use
* update examples to use it
* update changelog
* the previous component_tween_system retains api, the new fn allow for registration per TimeCtx
* update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants