-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It seems to me that most of the work to get non-linear easing is already done. In order to check what is left to be done I removed the linear-only enforcement, created a simple example with 3 key frames and compared the results with lottielab.com editor: ![easing_compare_before](https://github.com/user-attachments/assets/0e7a5df6-f10f-4c45-a31f-f15c75cc8ff2) I have found that: - only the easing curves from first two key frames seem to affect the animation as rendered in lottielab. - [Lottie spec](https://lottie.github.io/lottie-spec/latest/specs/properties/) mentions that: "_All keyframes MUST have an i and o value, unless It is the last keyframe in the sequence OR ..._" - This comment mentions that the last one is unused: airbnb/lottie-web#2620 (comment) The way I understand it is that while we are moving into position described by next key frame, we still should be using `o` and `i` parameters from the previous one. After changing the `Time::frames_and_weight` to use the easing from current key frame, positions seem to match pretty well: ![easing_compare_after](https://github.com/user-attachments/assets/d2a563d8-66b4-40d5-a49e-f67fd7dee529) What do you think? Is there anything else missing to enable non-linear easing? Thanks for creating an amazing library! --------- Co-authored-by: Spencer C. Imbleau <spencer@imbleau.com>
- Loading branch information
Showing
5 changed files
with
25 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters