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

Penner's functions approximation results in sloppy animations #591

Closed
leo-cheron opened this issue Jul 18, 2019 · 7 comments
Closed

Penner's functions approximation results in sloppy animations #591

leo-cheron opened this issue Jul 18, 2019 · 7 comments

Comments

@leo-cheron
Copy link

leo-cheron commented Jul 18, 2019

It seems the Robert Penner's equations are approximated, resulting in very sloppy animations compared to the original simplified functions.

Here's a simple demo exposing easeInOutExpo wrong behaviour:
https://codepen.io/mrgnouqsdqsd/pen/ZgEVZR

I appreciate the effort to keep the lib very light, but we really can't mess with these equations in an animation library.

Simplified equations: https://github.com/greensock/GreenSock-JS/blob/master/src/uncompressed/easing/EasePack.js

@juliangarnier
Copy link
Owner

Hey thanks for pointing this out.
I'm currently working on an easing refactoring, and was thinking about switching back to pure functions instead of approximated cubic bezier curves.
Will released in the next version!

@juliangarnier
Copy link
Owner

Fixed in v3.1.0!

@ghost
Copy link

ghost commented Jul 25, 2019

@juliangarnier Can you elaborate?
We can continue to use Robert Penner's Easing Functions in 3.1.0 as before, you've just changed their inner implementation?

@juliangarnier
Copy link
Owner

@web2033 yes, no API change, just more accurate functions.

@leo-cheron
Copy link
Author

@juliangarnier I realised Quad, Cubic, Quart, Quint, and Expo penner functions are still returning some approximated and inaccurate results.

It can be showcased in the original codepen : https://codepen.io/mrgnouqsdqsd/pen/ZgEVZR

@leo-cheron
Copy link
Author

@juliangarnier Hoy, I guess this issue should be reopened as it has not been completely fixed. It forces the use of external libs with custom ease function on each anime() call.

@juliangarnier juliangarnier reopened this Nov 28, 2023
@juliangarnier
Copy link
Owner

Quad, Cubic, Quart, Quint issues have been fixed in 3.2 for a while now, but I just realized that the Expo fix has never been published on the v3 branch (I've been using the v4 branch for years...).
It's fixed now!

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