Skip to main content

SimulationOptions

@zylem/game-lib


@zylem/game-lib / runtime / SimulationOptions

Interface: SimulationOptions

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:233

@zylem/game-lib/runtime public API.

The simulation layer is owned by @zylem/behaviors; game-lib re-exports the pieces hosts need for advanced/diagnostic use (the same types surfaced by game.experimental.getRuntime()), plus the plain-data collider builders.

Extends​

  • WasmStageRuntimeOptions

Properties​

fixedTimestep?​

optional fixedTimestep?: number

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:235

Fixed physics timestep in seconds (default 1/60).


gravity?​

optional gravity?: readonly [number, number, number]

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:523

Inherited from​

WasmStageRuntimeOptions.gravity


imports?​

optional imports?: Imports

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:524

Inherited from​

WasmStageRuntimeOptions.imports


initialCapacity?​

optional initialCapacity?: number

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:522

Inherited from​

WasmStageRuntimeOptions.initialCapacity


maxSubSteps?​

optional maxSubSteps?: number

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:237

Max fixed steps per update() to avoid death spirals (default 2).


sleepAngularThreshold?​

optional sleepAngularThreshold?: number

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:248


sleepLinearThreshold?​

optional sleepLinearThreshold?: number

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:247

Sleep activation overrides applied after create. Defaults match the aggressive canSleep policy on newly attached bodies.


solverIterations?​

optional solverIterations?: number

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:242

Rapier contact solver iterations (default 4; auto-drops to 2 when a stage has 512+ dynamic bodies). Lower = faster, less stable stacks.


source?​

optional source?: ArrayBuffer | URL | Uint8Array<ArrayBufferLike> | RequestInfo

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:529

Custom wasm source. Defaults to the zylem_runtime.wasm bundled with @zylem/runtime.

Inherited from​

WasmStageRuntimeOptions.source


timeUntilSleep?​

optional timeUntilSleep?: number

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:249