Skip to main content

BehaviorSystem

@zylem/game-lib


@zylem/game-lib / behavior / BehaviorSystem

Interface: BehaviorSystem

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:852

A behavior system that processes entities with specific components.

Example​

class ThrusterSystem implements BehaviorSystem {
update(_ecs: unknown, delta: number): void {
// Iterate behavior links, push intent into wasm runtime, etc.
}
}

Methods​

attach()?​

optional attach(link): void

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:854

Optional eager initialization when a behavior link is registered on a live entity

Parameters​

BehaviorEntityLink

Returns​

void


destroy()?​

optional destroy(ecs?): void

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:866

Optional cleanup when stage is destroyed

Parameters​

ecs?​

unknown

Returns​

void


detach()?​

optional detach(link): void

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:864

Optional cleanup when a behavior link is detached from a live entity

Parameters​

BehaviorEntityLink

Returns​

void


postUpdate()?​

optional postUpdate(ecs, delta): void

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:862

Called once per frame after the simulation has stepped and before the host syncs render poses. Systems that need this frame's post-step state (e.g. wasm-side teleports) run here instead of in update.

Parameters​

ecs​

unknown

delta​

number

Returns​

void


update()​

update(ecs, delta): void

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/behavior-system-DkFAwLb_.d.ts:856

Called once per frame. The first argument is always undefined (reserved legacy slot).

Parameters​

ecs​

unknown

delta​

number

Returns​

void