跳转到内容

AppContext

此内容尚不支持你的语言。

Defined in: ecs/context.ts:55

new AppContext(): AppContext

AppContext

readonly componentRegistry: Map<string, any>

Defined in: ecs/context.ts:56


editorBridge: EditorBridge | null = null

Defined in: ecs/context.ts:61


editorMode: boolean = false

Defined in: ecs/context.ts:72

Run mode. editorMode = an editor host is attached (vs a standalone runtime); playMode = within an editor, gameplay is running. Gameplay systems gate on these via playModeOnly (env.ts). Kept here so all app-scoped mutable state lives on one context (with componentRegistry / editorBridge / pendingSystems) rather than in a separate module global, so isolated Apps get isolated run modes.


readonly pendingPlugins: unknown[] = []

Defined in: ecs/context.ts:60

Plugins a project bundle installed at module level, drained with the systems: a bundle is imported before an App exists.


readonly pendingSystems: PendingSystemEntry[] = []

Defined in: ecs/context.ts:57


playMode: boolean = false

Defined in: ecs/context.ts:73


readonly wasmError: WasmErrorState

Defined in: ecs/context.ts:62

drainPendingPlugins(): unknown[]

Defined in: ecs/context.ts:82

unknown[]

Drain all pending plugins and clear the queue


drainPendingSystems(): PendingSystemEntry[]

Defined in: ecs/context.ts:76

PendingSystemEntry[]

Drain all pending systems and clear the queue


reset(): void

Defined in: ecs/context.ts:87

void

Reset all mutable state for a new session