1.0.5 • Published 9 years ago

tweeny v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Tweeny

A teeny tween class!

npm install --save tweeny

Usage

var Tween          = require('tweeny')
var easeInOutQuart = require('tweeny/easing/easeInOutQuart')

var target = document.querySelector('#thing')

var tween = new Tween({
  from: { opacity: 0 },
  to: { opacity: 1 },
  duration: 1000,
  easing: easeInOutQuart,
  onUpdate: function(state) {
    target.style.opacity = state.opacity
  },
  onComplete: function() {
    alert('done!')
  }
})

For < IE 10 support, you'll need to requestAnimationFrame polyfill.

Easing functions by Robert Penner.

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago