anim
Animate a property from current to specified value, with requestAnimationFrame and easing.
example
// Fake scroll
api
anim(obj, prop, to, opts, cb)
{object} obj
Container object{string} prop
Property to animate{mixed} to
Target value{object} opts
Optional options{Function} cb
Optional callback
Options are:
{integer} duration
In ms{boolean} px
Append "px" to value{boolean} round
Round value{string} ease
Easing function, e.g.outSine
orinOutQuart
install
With npm do:
npm install anim
license
MIT
credits
Adapted from scroll by Michael Rhodes (license: MIT).