mattdesl / eases Goto Github PK
View Code? Open in Web Editor NEWa grab-bag of modular easing equations
License: MIT License
a grab-bag of modular easing equations
License: MIT License
The expoOut function is meant to serve as an ease to gradually go from 0 to 1. I noted a glitch. When going from 0.0 to 1.0 in steps of 0.01, the last few values are as follows:
input: output:
0.96 0.9987114180558858
0.97 0.9987977105338428
0.98 0.9988782242626982
0.99 0.9989533462279919
1 1
Diff from 0.98 to 0.99: 0.00007512196529368964
Diff from 0.99 to 1.00: 0.001046653772008077
As you can see, the diff 0.99 to 1.00 is substantually bigger than the diff from 0.98 to 0.99. In animations, this causes excactly what you try to prevent!
Looking at the code:
function expoOut(t) {
return t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t)
}
Returning 1.0 when t === 1.0 is WRONG in my opinion.
Agree?
I can't confirm 100% but it looks like back-out.js
might be doing an elastic ease instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.