SimulationEvent
@zylem/game-lib / runtime / SimulationEvent
Type Alias: SimulationEvent
SimulationEvent = \{
a:EntityHandle|null;b:EntityHandle|null;normal: [number,number];sensor:boolean;type:"collisionStarted"|"collisionStopped"; \} | \{axes:number;entity:EntityHandle|null;signs:number;type:"boundaryHit"; \} | \{entity:EntityHandle|null;kind:number;type:"ricochet"; \} | \{entity:EntityHandle|null;triggerId:number;type:"regionEntered"; \} | \{entity:EntityHandle|null;jumpCount:number;type:"jumpStarted"; \} | \{entity:EntityHandle|null;type:"landed"; \} | \{axes:number;entity:EntityHandle|null;type:"wrapped"; \} | \{cooldownId:number;entity:EntityHandle|null;type:"cooldownFired"; \}
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/core.d.ts:176
Typed, handle-resolved simulation event.
Union Members
Type Literal
\{ a: EntityHandle | null; b: EntityHandle | null; normal: [number, number]; sensor: boolean; type: "collisionStarted" | "collisionStopped"; \}
a
a:
EntityHandle|null
b
b:
EntityHandle|null
normal
normal: [
number,number]
Best-effort contact normal (x, y); zero for sensor pairs / stops.
sensor
sensor:
boolean
True when either collider in the pair is a sensor (zone overlap).
type
type:
"collisionStarted"|"collisionStopped"
Type Literal
\{ axes: number; entity: EntityHandle | null; signs: number; type: "boundaryHit"; \}
Type Literal
\{ entity: EntityHandle | null; kind: number; type: "ricochet"; \}
Type Literal
\{ entity: EntityHandle | null; triggerId: number; type: "regionEntered"; \}
Type Literal
\{ entity: EntityHandle | null; jumpCount: number; type: "jumpStarted"; \}
Type Literal
\{ entity: EntityHandle | null; type: "landed"; \}
Type Literal
\{ axes: number; entity: EntityHandle | null; type: "wrapped"; \}
Type Literal
\{ cooldownId: number; entity: EntityHandle | null; type: "cooldownFired"; \}