1.0.3 • Published 6 years ago

timing-curve v1.0.3

Weekly downloads
5
License
ISC
Repository
-
Last release
6 years ago

timing-curve

npm package

usage

npm i -s timing-curve

import TimingCurve from "timing-curve"

const y = TimingCurve(keyframes, time)

time - current time from 0 to 1

keyframes - array of arrays with x & y points [[x, y], ..., [x, y]]

each next x value must be bigger then previous!

Use editor for keyframes

const keyframes = [
  [0.1, 0.04],
  [0.2, 0.15],
  [0.4, 0.6],
  [0.6, 0.8],
  [0.8, 0.92],
]
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago