Bounces aball horizontally in html5 canvas