A small set of JS functions to help in HTML5 game development.