-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add specified easing functions specified in (#88) #90
Conversation
Hi there. Thanks for taking the time to contribute to Maple! About testing the easing functions, I plan to add something similar to https://svelte.dev/examples#easing which should allow to visually test the easing functions. If I can get that finished fast enough, you can rebase it. |
I thought about testing and a simple sanity test could just be checking that A macro could generate these test cases for all the easing functions. |
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.
I got a few nits if you don't mind. I would prefer if all the numbers had at least 1 digit after the decimal point (so 1.0
instead of 1.
). I think this makes it easier to see that it's a float rather than a number with a function call. It might also be clearer if you used associated functions (so f32::powi(t - 1.0, 2)
instead of (t - 1.0).powi(2)
).
I tried out the easing functions in the tweened
example (you can run it using trunk serve
) and some of them didn't work as expected so I added some fixes.
Commit suggested changes Co-authored-by: Luke Chu <[email protected]>
I switched out the formats now, but again this is just formalities so I hope you like it this way. :) |
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.
Looks good. I'll merge this now
What was added
Functions for circular, sine, exponential and bouncing easing have been added to
easing.rs
. Further, I added 3 constants. This doesn't have to close (#88), since one could still add functions.Remarks