@tchesa/ease
v0.0.6
Published
A tiny javascript easing package with no dependencies.
Readme
@tchesa/ease
A tiny javascript easing package with no dependencies.
Install
npm i @tchesa/easeUsage
import { easeOutCubic } from '@tchesa/ease'
console.log(easeOutCubic(0.5)); // -> 0.875Methods
easeInSineeaseOutSineeaseInOutSineeaseInQuadeaseOutQuadeaseInOutQuadeaseInCubiceaseOutCubiceaseInOutCubiceaseInQuarteaseOutQuarteaseInOutQuarteaseInQuinteaseOutQuinteaseInOutQuinteaseInExpoeaseOutExpoeaseInOutExpoeaseInCirceaseOutCirceaseInOutCirceaseInBackeaseOutBackeaseInOutBackeaseInElasticeaseOutElasticeaseInOutElasticeaseInBounceeaseOutBounceeaseInOutBounce
Contribute
To include a new easing function:
- Create a
index.tsinside a new folder for each easing function insidesrc, e.g.src/newEasingFunction/index.ts; - include their export in
src/index.tsfile.
// ...
export { default as newEasingFunction } from "./newEasingFunction";Easing functions' implementation from See https://easings.net/.
