Skip to content

ScenesState

Defined in: packages/engine/src/stores/scenes.ts:13

Property Type Description
active string | null -
go (name) => void Makes that scene the one Game draws. Throws on a name nobody registered.
registerScene (name, component) => Disposer Names a scene; the return forgets it.
reload () => void Starts the active scene again: its world and entities go, and spawn anew as they did when it opened.
reloads number The reloads so far: the active scene’s key, so each one remounts it.
scenes Record<SceneName, ComponentType> -