Skip to content

Commit

Permalink
Clean up code to find the current keyframe (#11306)
Browse files Browse the repository at this point in the history
# Objective

While working on #10832, I found this code very dense and hard to
understand.

I was not confident in my fix (or the correctness of the existing code).

## Solution

Clean up, test and document the code used in the `apply_animation`
system.

I also added a pair of length-related utility methods to `Keyframes` for
easier testing. They seemed generically useful, so I made them pub.

## Changelog

- Added `VariableCurve::find_current_keyframe` method.
- Added `Keyframes::len` and `is_empty` methods.

---------

Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com>
  • Loading branch information
alice-i-cecile and Alice Cecile authored Jan 13, 2024
1 parent 9926123 commit 98b62e8
Showing 1 changed file with 295 additions and 91 deletions.
Loading

0 comments on commit 98b62e8

Please sign in to comment.