andevengine
A 2D TypeScript engine that runs the four Canvas games on this site. It takes care of the loop, input and the canvas; collision, physics and cameras live in each game's own code.
Technical details
- Game class: 2D context, a requestAnimationFrame loop, delta time in seconds and load, update and render hooks
- Input: keeps the set of pressed keys and treats the mouse button as one more key
- Cursor: mouse position converted to canvas coordinates
- Vector2 for positions, velocities and directions
- Used by Classic Pong, Spaceship Meteor, Flappy Thing and Angry Blocks; each game ships its own copy of the engine in its repository