Skip to content

@modoki/engine / index / NavigationManager

Interface: NavigationManager

Public surface of the navigationManager singleton. See the module doc above.

Extends

Managers

actions?

optional actions?: Record<string, UIActionDef | UIActionHandler>

Named UIAction handlers owned by this manager (same shape systems use). Registered on activate, removed on deactivate.

Inherited from

ManagerDef.actions


canGoBack

readonly canGoBack: boolean

True once at least one loadScene/back-eligible navigation has happened.


games?

optional games?: string[]

Game scope only: active-game ids to match; omit = every game.

Inherited from

ManagerDef.games


name

name: string

Inherited from

ManagerDef.name


scenes?

optional scenes?: string[]

Scene scope only: path substrings to match; omit = every scene.

Inherited from

ManagerDef.scenes


scope?

optional scope?: ManagerScope

Default 'scene'.

Inherited from

ManagerDef.scope


back()

back(): Promise<void>

Navigate to the previous scene, if any. Inert (no-op) at the root.

Returns

Promise<void>


dispose()?

optional dispose(ctx?): void

ctx carries the world the manager was operating against (on a scene swap this is the OLD world, still alive until just after dispose runs) so a dispose can tear down world-bound state on the correct world. Optional.

Parameters

ctx?

ManagerContext

Returns

void

Inherited from

ManagerDef.dispose


init()?

optional init(ctx): void | Promise<void>

Parameters

ctx

ManagerContext

Returns

void | Promise<void>

Inherited from

ManagerDef.init


loadScene()

loadScene(ref): Promise<void>

Navigate to a scene (GUID or path), pushing the current scene onto history so back() can return to it.

Parameters

ref

unknown

Returns

Promise<void>


replace()

replace(ref): Promise<void>

Navigate without recording history.

Parameters

ref

unknown

Returns

Promise<void>

Built with Modoki.