preload()
preload is called first. Normally you'd use this to load your game assets (or those needed for the current State)You shouldn't create any objects in this method that require assets that you're also loading in this method, asthey won't yet be available.
Source code: core/State.js (Line 125)