1.0.1 • Published 8 years ago

@jkroso/move v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

move

Pure JS DOM animation. Still at the experimental stage. Inspiration coming from move.js and firmin though by staying in JS as much as possible I hope to be able to go a lot further.

Note: it's plenty fast for most use cases but CSS animations will probably always be faster.

Installation

With your favorite package manager:

  • packin: packin add jkroso/move
  • component: component install jkroso/move
  • npm: npm install jkroso/move

then in your app:

var move = require('move')

Usage

move(document.body)
  .set('background-color', 'blue')
  .rotate(30)
  .scale(2)
  .ease('out-bounce')
  .duration('.2s')
  .then()
    .rotate(-30)
    .scale(.5)

This will enlarge the document while rotating it clockwise and changing the background color to blue. then() 200ms later when that animation completes it will animate back to its original size and rotation.

Running the tests

Just run make and navigate your browser to test/index.html