Skip to main content

Class: TimeStep

timestep.TimeStep

Stores variations of the delta time, the time between each frame/update.

Constructors

constructor

โ€ข new TimeStep(time, dt, lastDt)

Creates an TimeStep.

Parameters

NameTypeDescription
timenumberThe current time
dtnumberThe current delta time
lastDtnumberThe last delta time

Defined in

src/timestep.ts:26

Properties

dt

โ€ข dt: number

Defined in

src/timestep.ts:12


dtRatio

โ€ข dtRatio: number

Defined in

src/timestep.ts:14


dtSquared

โ€ข dtSquared: number

Defined in

src/timestep.ts:16


inverseDt

โ€ข inverseDt: number

Defined in

src/timestep.ts:17


lastDt

โ€ข lastDt: number

Defined in

src/timestep.ts:13


time

โ€ข time: number

The time of the start of the timestep in ms since the page loaded.

see performance.now

Defined in

src/timestep.ts:10