@tchesa/ease
v0.0.6
Published
A tiny javascript easing package with no dependencies.
Downloads
2
Readme
@tchesa/ease
A tiny javascript easing package with no dependencies.
Install
npm i @tchesa/ease
Usage
import { easeOutCubic } from '@tchesa/ease'
console.log(easeOutCubic(0.5)); // -> 0.875
Methods
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
Contribute
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";
Easing functions' implementation from See https://easings.net/.