A base class for animations. Used by move and timeline
npm install @jkroso/animation
then in your app:
import Animation from 'animation'
set duration to n
milliseconds. You can also
pass a natural language string
animation.duration('1.2s')
Set easing function to fn
.
animation.ease('in-out-sine')
run the animation with an optional duration
animation.run()
render the animation at point n
between its endpoints where n
is a number from 0
to 1
. Subclasses may also choose to apply the ._ease()
function to n
within render.
Mover.prototype.render = function(n){
// apply changes here
}