A tiny javascript easing package with no dependencies.
npm i @tchesa/ease
import { easeOutCubic } from '@tchesa/ease'
console.log(easeOutCubic(0.5)); // -> 0.875
easeInSine
easeOutSine
easeInOutSine
easeInQuad
easeOutQuad
easeInOutQuad
easeInCubic
easeOutCubic
easeInOutCubic
easeInQuart
easeOutQuart
easeInOutQuart
easeInQuint
easeOutQuint
easeInOutQuint
easeInExpo
easeOutExpo
easeInOutExpo
easeInCirc
easeOutCirc
easeInOutCirc
easeInBack
easeOutBack
easeInOutBack
easeInElastic
easeOutElastic
easeInOutElastic
easeInBounce
easeOutBounce
easeInOutBounce
To include a new easing function:
- Create a
index.ts
inside a new folder for each easing function insidesrc
, e.g.src/newEasingFunction/index.ts
; - include their export in
src/index.ts
file.
// ...
export { default as newEasingFunction } from "./newEasingFunction";
- include some tests and a README.md file with some details.