ez.js
Importable easing functions in ES6
Install
npm install ez.js --save
Use
Import singular
; let timeStart;let diff = 1; { if !timeStart timeStart = currTime; let elapsed = currTime - timeStart; let tick = ; console; ;};
Import all
for let key of Object ;
Use as non-ES6
// download minified dist file and add it as a script<script src="dist.min.js"></script>
Using easing functions
Takes four parameters, t: current time, b: beginning value, c: change in value, d: duration
.
This will output a single number depending on how long the function has been running, this is great in conjunction with requestAnimationFrame
to produce buttery animations.
Easings from Robert Penner