Skip to main content
Defined in: modules/ecs/src/server/index.ts:6 Server-side ECS library — loads the Node-targeted compiled WASM module.

Extends

  • EcsLibrary

Constructors

Constructor

new EcsLibrary(): EcsLibrary
Defined in: modules/ecs/src/server/index.ts:7

Returns

EcsLibrary

Overrides

BaseEcsLibrary.constructor

Properties

key

readonly key: "ecs"
Defined in: modules/ecs/src/shared/ecs-library.ts:36 This library’s identity: its slot on Context, its registry key, and the identifier used to reference it in ordering relationships.

Inherited from

BaseEcsLibrary.key

Accessors

registry

Get Signature

get registry(): Registry
Defined in: modules/ecs/src/shared/ecs-library.ts:78
Returns
Registry

Inherited from

BaseEcsLibrary.registry

relationships

Get Signature

get relationships(): LibraryRelationships
Defined in: packages/common/dist/index.d.ts:512 Internal
Returns
LibraryRelationships

Inherited from

BaseEcsLibrary.relationships

Methods

__clear()

__clear(_ctx): Promise<void>
Defined in: packages/common/dist/index.d.ts:525 Called once after the tick loop stops.

Parameters

_ctx
Context

Returns

Promise<void>

Inherited from

BaseEcsLibrary.__clear

__editorInit()

__editorInit(ctx): Promise<void>
Defined in: modules/ecs/src/shared/ecs-library.ts:60 Listens to the editor’s commands (hot-reload, live mode).

Parameters

ctx
EditorInitContext

Returns

Promise<void>

Inherited from

BaseEcsLibrary.__editorInit

__events()

__events(_ctx): Promise<void>
Defined in: modules/ecs/src/shared/ecs-library.ts:70 Live mode: runs every tick, paused ones too, so the editor sees the world while paused.

Parameters

_ctx
Context

Returns

Promise<void>

Inherited from

BaseEcsLibrary.__events

__init()

__init(ctx): Promise<void>
Defined in: modules/ecs/src/shared/ecs-library.ts:47 Called once, in dependency order, before the tick loop starts.

Parameters

ctx
InitContext

Returns

Promise<void>

Inherited from

BaseEcsLibrary.__init

__run()

__run(ctx): Promise<void>
Defined in: modules/ecs/src/shared/ecs-library.ts:74 Called every tick, in run order, while the tick loop is active and not paused.

Parameters

ctx
Context

Returns

Promise<void>

Inherited from

BaseEcsLibrary.__run

expose()

expose(): EcsContextApi
Defined in: modules/ecs/src/shared/ecs-library.ts:83 Returns this library’s public contribution to Context[this.key].

Returns

EcsContextApi

Remarks

Return a plain object exposing only what game code should be able to reach — never this — so internal state and lifecycle hooks never leak onto Context. Libraries with nothing to expose (headless libraries) can leave this unimplemented; they simply won’t appear on Context.

Inherited from

BaseEcsLibrary.expose

throwNotInitializedError()

protected throwNotInitializedError(): never
Defined in: packages/common/dist/index.d.ts:536

Returns

never

Inherited from

BaseEcsLibrary.throwNotInitializedError