Use requestAnimationFrame NOT setInterval for animation loops
Animate an image across the Canvas
Animate at a specified interval add a new rectangle every 1 second
Animate at a specified time an animated clock
Dont draw animations in your event handlers a simple sketch app
Easing using Robert Penners equations
Set frame rate using requestAnimationFrame