3 ms·
I also didn't like when a new easing happened _while_ another easing was happening, which often felt very jerky. Had to do a bunch of calculus (derivatives) by
by franciscop 1y ago
I also didn't like when a new easing happened _while_ another easing was happening, which often felt very jerky. Had to do a bunch of calculus (derivatives) by hand and wrote a small library for it in JS:
https://github.com/franciscop/ola https://github.com/franciscop/ola
Note: ola means (sea) wave in Spanish
- pahgawk 1y agoThanks for sharing this library! Author of the post here, I'll definitely check out your implementation.
- franciscop 1y agoThanks! From your article, you might not want/like my library since it's based on a single easing function. I used a cubic function to find out the interpolation values, and the derivative to make sure it's always smooth. The equation looks like this, it's on the source code: https://www.wolframalpha.com/input/?i=x+%3D+2+*+t+%5E+3+-+3+*+t+%5E+2+%2B+1+from+t+%3D+0+to+t+%3D+1 https://www.wolframalpha.com/input/?i=x+%3D+2+*+t+%5E+3+-+3+... If you wanted some more details please feel free to ping me (email through my website's resume, or Twitter) and I'll dig the handwritten equations.