1.1.6 • Published 3 years ago

@superherocheesecake/ease v1.1.6

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Ease

Custom easings

Installation

npm i --save @superherocheesecake/ease

Use it

import {lerp, sine, ...} from '@superherocheesecake/ease';

lerp

linear ease

// import
import {lerp} from '@superherocheesecake/ease';

// onUpdate
const start = lerp(start, end, multiplier);

lerpAngle

linear ease, angle values in radians.

// import
import {lerpAngle} from '@superherocheesecake/ease';

// onUpdate
const start = lerpAngle(start, end, multiplier);

berp

boing-like ease

// import
import {berp} from '@superherocheesecake/ease';

// onUpdate
const start = berp(start, end, multiplier);

clerp

circular linear ease

// import
import {clerp} from '@superherocheesecake/ease';

// onUpdate
const start = clerp(start, end, multiplier);

hermite

easeInOut

// import
import {hermite} from '@superherocheesecake/ease';

// onUpdate
const start = hermite(start, end, multiplier);

coserp

easeIn

// import
import {coserp} from '@superherocheesecake/ease';

// onUpdate
const start = coserp(start, end, multiplier);

sinerp

easeOut

// import
import {sinerp} from '@superherocheesecake/ease';

// onUpdate
const start = sinerp(start, end, multiplier);

Spring

elastic ease

// import
import {Spring} from '@superherocheesecake/ease';

// inInitialize
const spring = new Spring(0.92, 30.0, 0.4); // damp, mass, stiffness

// onUpdate
const start = spring.update(start, end);
1.1.6

3 years ago

1.1.5

3 years ago

1.1.4-canary.4

3 years ago

1.1.4-canary.3

3 years ago

1.1.4

4 years ago

0.0.1

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago