Majority of my project share the same "boilerplate" code to make page look like an app and have decent support of different devices.
File | Purpose |
---|---|
init.js | Entry point and global variables |
sprite.js | Class that manages sprite loading |
frame.js | Rendering and update loop |
ctx.js | Wrapper for Context functions to use them with Vector class |
screen.js | Class that stores and updates canvas size |
input.js | Class with event handlers |
utils.js | Helper functions |
perlin.js | Optional function for perlin noise |
vector.js | Class for vector math |