HTML5 2D game engine writen in TypeScript