Plugin hooks
Plugins can define hook functions that the engine will call at various stages of loading. These hooks can be used to run custom code at those points.
Available hooks
onPageLoaded
: Earliest hook called as soon as the page startsonNarratSetup
: Called when the narrat app is created but before anything is mountedonAppMounted
: Called when the main narrat app has been mounted to the DOMonAssetsLoaded
: Called as soon as asset loading is overonGameSetup
: Called at the very end of the game loading process, before the engine properly startsonStartScreenMounted
: Called when the start screen has been mounted to the DOMonGameStart
: Called when a game starts via pressing new game or continueonGameMounted
: Called when the in-game scene has been mounted to the DOM (game has started playing)onGameUnmounted
: Called when the in-game scene has been unmounted from the DOM (game has stopped playing)