Interface PhysicsTimingOptions

For configuring the timing systems to use for engine updates and rendering

PhysicsTimingOptions

interface PhysicsTimingOptions {
    lastDelta: number;
    lastElapsed: number;
    timeScale: number;
    timestamp: number;
}

Properties

lastDelta: number

A Number that represents the delta value used in the last engine update. default is 0

lastElapsed: number

A Number that represents the total execution time elapsed during the last Engine.update in milliseconds. It is updated by timing from the start of the last Engine.update call until it ends. default is 0. This value will also include the total execution time of all event handlers directly or indirectly triggered by the engine update.

timeScale: number

A Number that specifies the global scaling factor of time for all bodies. A value of 0 freezes the simulation. A value of 0.1 gives a slow-motion effect. A value of 1.2 gives a speed-up effect. default is 1

timestamp: number

A Number that specifies the current simulation-time in milliseconds starting from 0. It is incremented on every Engine.update by the given delta argument. default is 0

Generated using TypeDoc