Skip to content

Commit

Permalink
Fix repeat mode broken after first iteration (#57)
Browse files Browse the repository at this point in the history
Fix the repeat mode being broken after the first iteration due to
`AnimClock::progress()` reporting a progress greater than `1.`, which was
breaking the logic of `Tween` and `Lens`.

Also fix `Tween::rewind()` not restoring the original tween direction when
using a repeat strategy of `RepeatStrategy::MirroredRepeat`.

Fixes #42
  • Loading branch information
djeedai authored Sep 28, 2022
1 parent fdc3ede commit 175c8b7
Show file tree
Hide file tree
Showing 2 changed files with 241 additions and 89 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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`.

### Removed

Expand Down
Loading

0 comments on commit 175c8b7

Please sign in to comment.