@creenv/easings
v0.0.1
Published
a set of easings method
Downloads
11
Readme
Creenv easings
A list of easings functions. This package is standalone and doesn't need the creative environment to work.
1. Installation
npm install --save @creenv/easings
2. Usage
import EASINGS from "@creenv/easings";
let x = 0.4;
let xEased = EASINGS.linear(x);
3. Easings list
| Name | Description | | ---- | ----------- | | linear | t => t | | quadIn | t => tt | | quadOut | t => t(2-t) | | quadInOut | t => (t<0.5) ? 2tt : -1+(4-2t)t | | cubicIn | t => ttt | | cubicOut | t => (--t)tt+1 | | cubicInOut | t => t<.5 ? 4ttt : (t-1)(2t-2)(2t-2)+1 | | quartIn | t => tttt | | quartOut | t => 1-(--t)ttt | | quartInOut | t => t<.5 ? 8tttt : 1-8(--t)ttt | | quintIn | t => ttttt | | quintOut | t => 1+(--t)tttt | | quintInOut | t => t<.5 ? 16ttttt : 1+16*(--t)tttt |