Skip to content
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 smoothstep #177

Open
Not-A-Normal-Robot opened this issue Sep 5, 2023 · 1 comment
Open

Add smoothstep #177

Not-A-Normal-Robot opened this issue Sep 5, 2023 · 1 comment

Comments

@Not-A-Normal-Robot
Copy link

https://en.wikipedia.org/wiki/Smoothstep

@scottmcm
Copy link

scottmcm commented Dec 6, 2024

Alternatively, change some of the existing InOuts to be these Hermite functions

For example, this piecewise definition of easeInOutQuint is IMHO poor

easeInOutQuint: function (x) {
return x < 0.5 ? 16 * x * x * x * x * x : 1 - pow(-2 * x + 2, 5) / 2;
},

because that definition is really jerky: it jumps from +40 acceleration to -40 acceleration instantly https://www.desmos.com/calculator/vrnk8cfacz

If I'm bothering to go all the way to quintic, I'd expect it to be t³+3t³(1-t)+6t³(1-t)² so that the velocity, acceleration, and jerk are all continuous.

EDIT: If you want explicit formulas for the In and Out versions of Smooth(er)Step, you can find them in bevyengine/bevy#16957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants