Skip to content
Snippets Groups Projects
CHANGELOG.md 10.46 KiB

Changelog

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.6.0] - 2022-11-15

Added

  • Added RepeatCount and RepeatStrategy for more granular control over animation looping.
  • Added with_repeat_count() and with_repeat_strategy() builder methods to Tween<T>.
  • Added a speed() getter on Animator<T> and AssetAnimator<T>.
  • Added set_elapsed(Duration) and elapsed() -> Duration to the Tweenable<T> trait. Those methods are preferable over set_progress() and progress() as they avoid the conversion to floating-point values and any rounding errors.
  • Added a new bevy_text feature for Text-related built-in lenses.
  • Added Targetable, ComponentTarget, and AssetTarget, which should be considered private even though they appear in the public API. They are a workaround for Bevy 0.8 and will likely be removed in the future once the related Bevy limitation is lifted.
  • Added the missing Tween::with_completed() to raise a callback.
  • Added completion event and callback support to Delay<T>, similar to what existed for Tween<T>.
  • Added TotalDuration and a new Tweenable<T>::total_duration() method to retrieve the total duration of the animation including looping.

Changed

  • Compatible with Bevy 0.9
  • Removed the tweening_type parameter from the signature of Tween<T>::new(); use with_repeat_count() and with_repeat_strategy() instead.
  • Animators now always have a tween (instead of it being optional). This means the default animator implementation was removed.
  • Delay::new() now panics if the duration is zero. This prevents creating no-op Delay objects, and avoids an internal edge case producing wrong results.
  • Tweens moving to TweenState::Completed are now guaranteed to freeze their state. In particular, this means that their direction will not flip at the end of the last loop if their repeat strategy is RepeatStrategy::MirroredRepeat.
  • Moved the TextColorLens lens from the bevy_ui feature to the new bevy_text one, to allow using it without the Bevy UI crate.
  • Changed the signature of the component_animator_system() and asset_animator_system() public functions to directly consume a ResMut<Events<TweenCompleted>> instead of an EventWriter<TweenCompleted>, to work around some internal limitations.
  • Changed Delay into Delay<T>, taking the animation target type like other tweenables, to be able to emit events and raise callbacks.
  • Changed CompletedCallback<T> to take the tweenable type itself, instead of the target type. Users upgrading should replace CompletedCallback<T> with CompletedCallback<Tween<T>>.
  • The set_progress(), progress(), and times_completed() method of Tweenable<T> now have a default implementation, and all built-in tweenables use that implementation.

Removed

  • Removed Tweenable::is_looping(), which was not implemented for most tweenables.
  • Removed TweeningType in favor of RepeatCount and RepeatStrategy.

Fixed

  • Fixed the animator speed feature, which got broken in #44.
  • Fixed change detection triggering unconditionally when component_animator_system() or asset_animator_system() are ticked, even when the animator did not mutate its target component or asset. (#33)

[0.5.0] - 2022-08-04

Added

  • Added is_forward() and is_backward() convenience helpers to TweeningDirection.
  • Added Tween::set_direction() and Tween::with_direction() which allow configuring the playback direction of a tween, allowing to play it backward from end to start.
  • Added support for dynamically changing an animation's speed with Animator::set_speed.
  • Added AnimationSystem label to tweening tick systems.
  • Added a BoxedTweenable trait to make working with Box<dyn Tweenable + ...> easier.

Changed

  • Compatible with Bevy 0.8
  • Double boxing in Sequence and Tracks was fixed. As a result, any custom tweenables should implement From for BoxedTweenable to make those APIs easier to use.

[0.4.0] - 2022-04-16

Changed

  • Compatible with Bevy 0.7
  • Better dependencies: Introduced features bevy_sprite and bevy_ui taking a dependency on the same-named crates of Bevy, and removed the forced dependency on bevy/render. The new features are enabled by default, for discoverability, and only impact the prebuilt lenses. The library now builds without any Bevy optional feature.

[0.3.3] - 2022-03-05

Added

  • Added new built-in rotation lenses based on angle interpolation, to allow rotation animations larger than a half turn:
    • TransformRotateXLens
    • TransformRotateYLens
    • TransformRotateZLens
    • TransformRotateAxisLens

[0.3.2] - 2022-02-24

Added

  • Implemented Default for TweeningType (= Once), EaseMethod (= Linear), TweeningDirection (= Forward).
  • Added Tweenable::is_looping(), Tweenable::set_progress(), Tweenable::times_completed(), and Tweenable::rewind().
  • Added Animator::set_progress(), Animator::progress(), Animator::stop(), and Animator::rewind().
  • Added AssetAnimator::set_progress(), AssetAnimator::progress(), AssetAnimator::stop(), and AssetAnimator::rewind().
  • Added the TweenCompleted event, raised when a Tween<T> completed its animation if that feature was previously activated with set_completed_event() or with_completed_event().

Changed

  • TweenState now contains only two states: Active and Completed. Looping animations are always active, and non-looping ones are completed once they reach their end point.
  • Merged the started and ended callbacks into a completed one (Tween::set_completed() and Tween::clear_completed()), which is invoked when the tween completes a single iteration. That is, for non-looping animations, when TweenState::Completed is reached. And for looping animations, once per iteration (going from start -> end, or from end -> start).

Removed

  • Removed Tweenable::stop(). Tweenables do not have a "stop" state anymore, they are only either active or completed. The playback state is only relevant on the Animator or AssetAnimator which controls them.

Fixed