Object-oriented JS framework for the HTML5 canvas