0.0.1 • Published 7 years ago
@creenv/easings v0.0.1
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/easings2. 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 => t*t |
| 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)(2*t-2)+1 |
| quartIn | t => ttt*t |
| quartOut | t => 1-(--t)tt*t |
| 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 |
0.0.1
7 years ago