HTML5 Canvas tweening (pseudo)