JavaScript Interactive (Games) Tutorial

Adding a collision detection system between objects.

Canvas can be used to access cameras

This video does a great job of explaining the canvas and how to draw on it, how to move things around, and make it respond to the player

See also:

Very cute little Javascript game
https://js13kgames.com/games/tenacity/index.html
and the source:
https://github.com/GregPeck/tenacity