Drawing animations on the 2D HTML5 Canvas