Giter Site home page Giter Site logo

easee.js's Introduction

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':
  • 'in.quad':
  • 'out.quad':
  • 'inout.quad':
  • 'in.cubic':
  • 'out.cubic':
  • 'inout.cubic':
  • 'in.quart':
  • 'out.quart':
  • 'inout.quart':
  • 'in.quint':
  • 'out.quint':
  • 'inout.quint':
  • 'in.sine':
  • 'out.sine':
  • 'inout.sine':
  • 'in.expo':
  • 'out.expo':
  • 'inout.expo':
  • 'in.circ':
  • 'out.circ':
  • 'inout.circ':
  • 'in.elastic':
  • 'out.elastic':
  • 'inout.elastic':
  • 'in.back':
  • 'out.back':
  • 'inout.back':
  • 'in.bounce':
  • 'out.bounce':
  • 'inout.bounce':

easee.js's People

Contributors

hisahayashi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.