@twobulls/colib
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Colib

Build Status npm version semantic-release MIT license

Next generation tweening and timed logic sequencing for typescript.

Usage

At a Glance

Colib is a highly modular system for building complex animations/timed event sequences with support for coroutines.

globalScheduler().push(
  waitForTime(3),
  changeByOffset(balloon, {y: 100 }, 0.5, smooth()),
  parallel(
    changeFrom(balloon, {alpha: 0}, 0.3, smooth()),
    changeFrom(balloon, {scale: 0}, 0.5, inBack())
  ),
  coroutine(popBalloon)
);

function* popBalloon() {
  yield waitForTime(1);
  yield parallel(
    changeTo(balloon, {scale: 10}, 0.3, outBack())
    changeTo(balloon, {alpha: 0}, 0.2)
  );
  console.log("Popped");
}

Installation

yarn add colib
# OR
npm install colib

Documentation

Check out the documentation here.

Changelog

See the GitHub release history.

Contributing

Check our our contributor and developer guides.

Acknowledgements

Brought to you by Two Bulls

Dependencies (0)

    Dev Dependencies (28)

    Package Sidebar

    Install

    npm i @twobulls/colib

    Weekly Downloads

    0

    Version

    1.0.3

    License

    Apache-2.0

    Unpacked Size

    274 kB

    Total Files

    7

    Last publish

    Collaborators

    • 2bulls
    • darcy-rayner