-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added additional easing functions #17777
Conversation
@greeble-dev can I get your review here? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels both clearer and more consistent with CSS to add an enum and specify this behavior inside of the existing Steps
variant. That will also make the migration easier and more automatic.
Awkward.... I think this PR and #17752 both implement the same feature. #17752 has the advantage of addressing @alice-i-cecile 's comment about making the jump behaviour an enum, and includes updated svgs. But this PR is a bit simpler - the other adds a let c = EasingCurve::new(2.0, 4.0, EaseFunction::Steps(StepConfig::new(4).with_jump_at(JumpAt::Start))); I'd be happy to review either PR in more detail, but I'm reluctant to do that with both in play. |
Although I'll walk that back slightly - if a maintainer says "I'd rather you review both PRs and then we'll see what happens" then I can do that. |
Let's coalesce the efforts in #17752 :) |
Objective
Fixes #17744
Solution
This updated adds three additional easing functions to support the full set of functions available in CSS
https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description
Three new
EaseFunction
s were added, and the originalEaseFunction::Steps
was modified.I thought it made the most sense to have
Steps
be equivalent tojump-none
, and added additional functions for the remaining options.StepsStart
forjump-start
, and so on. The originalSteps
function is nowStepsEnd
, which may be a problem .Testing
I updated the
EaseFunction
s example to include the three new functions, and successfully tested the code locally.Showcase
Migration Guide
Calls to
EaseFunction::Steps
would need to be updated toEaseFunction::StepsEnd
to display the same behavior