Anime: Penner's functions approximation results in sloppy animations

Created on 18 Jul 2019  路  6Comments  路  Source: juliangarnier/anime

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

All 6 comments

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!

Fixed in v3.1.0!

@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?

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

@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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bofeiw picture bofeiw  路  4Comments

lukebatchelor picture lukebatchelor  路  7Comments

littlee picture littlee  路  3Comments

LiveLikeCounter picture LiveLikeCounter  路  3Comments

trusktr picture trusktr  路  6Comments