ecsia-monorepo / three/src / ThreeDriverOptions
Interface: ThreeDriverOptions
Defined in: three/src/driver.ts:17
Properties
update
readonly update: (dt) => void;Defined in: three/src/driver.ts:19
Advance the simulation by dt seconds. Typically scheduler.update.
Parameters
| Parameter | Type |
|---|---|
dt | number |
Returns
void
render
readonly render: () => void;Defined in: three/src/driver.ts:21
Draw the current state. Called once per frame after the sim step(s).
Returns
void
fixedTimestep?
readonly optional fixedTimestep?: number;Defined in: three/src/driver.ts:27
Fixed simulation step in seconds (e.g. 1/60). When set, the driver runs whole update(fixedTimestep) steps to consume accumulated real time (deterministic step count). When omitted, the driver is variable-step (one update(realDelta) per frame).
maxSubSteps?
readonly optional maxSubSteps?: number;Defined in: three/src/driver.ts:29
Max fixed steps per frame before the backlog is discarded (anti spiral-of-death). Default 8.
requestAnimationFrame?
readonly optional requestAnimationFrame?: (cb) => number;Defined in: three/src/driver.ts:35
The requestAnimationFrame to schedule on. Defaults to the global requestAnimationFrame when it exists (browser). Pass one explicitly to drive a custom loop; leave undefined in Node and call tick(dt) manually.
Parameters
| Parameter | Type |
|---|---|
cb | (timeMs) => void |
Returns
number
cancelAnimationFrame?
readonly optional cancelAnimationFrame?: (id) => void;Defined in: three/src/driver.ts:37
The cancelAnimationFrame paired with the rAF above.
Parameters
| Parameter | Type |
|---|---|
id | number |
Returns
void