easee.js

1.0.2 • Public • Published

Easee.js

npm version

Usage

1. Import Easee.js.

ES6

$ npm i easee.js
<script type="module">
import Easee from '../src/easee.js';
var easee = new Easee();
</script>

or

Script Load

<script type="text/javascript" src="../dist/easee.js"></script>
<script type="text/javascript">
var easee = window.easee;
</script>

2. Basic code.

// add tween item
var item = easee.add(1500, 0, 100, 'InOutSine');

// start tween item
item.run();

// animation loop
loop(){

  // update Easee
  easee.update();

  // get changed value
  console.log(item.get());

  requestAnimationFrame(loop);
};

// animation start
loop();

Example is here

3. Easing List

  • Linear
  • InQuad
  • OutQuad
  • InOutQuad
  • InCubic
  • OutCubic
  • InOutCubic
  • InQuart
  • OutQuart
  • InOutQuart
  • InQuint
  • OutQuint
  • InOutQuint
  • InSine
  • OutSine
  • InOutSine
  • InExpo
  • OutExpo
  • InOutExpo
  • InCirc
  • OutCirc
  • InOutCirc
  • InElastic
  • OutElastic
  • InOutElastic
  • InBack
  • OutBack
  • InOutBack
  • InBounce
  • OutBounce
  • InOutBounce

Readme

Keywords

none

Package Sidebar

Install

npm i easee.js

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

1.04 MB

Total Files

19

Last publish

Collaborators

  • hisa