main.js sets everything up. It binds keyevents, creates the shaders, loads the textures and sets up the game object.
game.js is where my game object resides. It holds a list of current objects on screen, a list of idle objects off screen and also variables spacifying its state (paused, playing, menu,..), score, gameSpeed (which increases over time) and so on.
drawables.js is where my object hierarchy is defined. I could use a new file for each drawable object, but because each .js file is a new http request (and I can't be bothered with minifying and/or asynchronous loading) it seemed like a good compromise. At the bottom of the hierarchy I have a simple Square object.
A Square has a position, a size, velocity and, optionally, a texture. Other drawable objects use the Square object to draw their components. As an example the Player object could be made of two Square objects. One for the main player model and one for the shadow.