tinkerbell

0.2.0 • Public • Published

tinkerbell

Tiny tweening library that sparkles. 200 bytes gzipped.

Install

npm i tinkerbell --save

Usage

import tink from 'tinkerbell'

function easeInOut (t, b, c, d) {
  if ((t /= d / 2) < 1) return c / 2 * t * t + b
  return -c / 2 * ((--t) * (t - 2) - 1) + b
}

const tween = tink(0, 500, 1000, easeInOut)

/** on each tick */
function tick (val) {}

/** on complete */
function done () {}

const stop = tween(tick, done)

/** stop animation in progress */
stop()

License

MIT License © Eric Bailey

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i tinkerbell

    Weekly Downloads

    53

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    6.27 kB

    Total Files

    8

    Last publish

    Collaborators

    • estrattonbailey