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.
Author
  • Mark Mayes / mm-dev
License
  • GPL-3.0-only
Source

Methods

(inner) createApp()

Source
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()

Source
Main initialisation
  • To be called from the HTML page eg PipeDream.init()

(inner) onAssetsLoaded()

Source
Assets have finished loading
  • Grab version number info from an imported JSON file
  • Initialise the game