PipeDream
Everything starts here
- This file is the JS entry point, where the code starts
- The process is:
index.html
-> main.js
-> IIFE -> App starts
- Although this file is called
main.js
by convention, this, the main module, is referred to as window.PipeDream
throughout the app.
Methods
(inner) createApp()
Create the main app, a simple outer wrapper for the game
- Import any URL hash parameters we're interested in
- Start the asset preloader and listen for an event telling us when it's finished
(inner) init()
Main initialisation
- To be called from the HTML page eg
PipeDream.init()
(inner) onAssetsLoaded()
Assets have finished loading
- Grab version number info from an imported JSON file
- Initialise the game