pixelkind / tweety

A simple class based tweening engine for javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweety

A simple class based tweening engine for javascript

Get started

Download the tween.js file and add it to your project. Now you can easily create tweens like this:

import Tween from "./tween.js";

let emoji = {x: 0, y: 0};

let tween = new Tween(emoji, 1.3, {
  x: 800,
  ease: "easeOutSine",
});

It works perfectly with class based objects, but also with simple object.

Features

  • speed (default: 1.0)
  • delay (default: 0)
  • repeat (default: 0)
  • yoyo (default: false)
  • autoStart (default: true)
  • ease (default: linear)

Easings

  • linear (default)
  • easeInCircular, easeOutCircular, easeInOutCircular
  • easeInCubic, easeOutCubic, easeInOutCubic
  • easeInExpo, easeOutExpo, easeInOutExpo
  • easeInQuadratic, easeOutQuadratic, easeInOutQuadratic
  • easeInQuartic, easeOutQuartic, easeInOutQuartic
  • easeInQuintic, easeOutQuintic, easeInOutQuintic
  • easeInSine, easeOutSine, easeInOutSine
  • easeInBounce, easeOutBounce, easeInOutBounce
  • easeInElastic, easeOutElastic, easeInOutElastic
  • easeInBack, easeOutBack, easeInOutBack

About

A simple class based tweening engine for javascript

License:MIT License


Languages

Language:JavaScript 100.0%