2D framework using HTML Canvas and Javascript