API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
namespaceTime
@codexo/exojs / core / stable
Constructors for the engine's time units. Grouped rather than exported loose because `seconds`, `minutes` and `hours` are names application code is likely to want for its own variables. ```ts const cooldown = new Timer(Time.seconds(1.5), true); scene.onFixedFrame.add(step => body.x += speed * step); ```
6
props
0
methods
0
events
Import
import { Time } from '@codexo/exojs'Constructors for the engine's time units.
Grouped rather than exported loose because `seconds`, `minutes` and `hours` are names application code is likely to want for its own variables.
```ts const cooldown = new Timer(Time.seconds(1.5), true); scene.onFixedFrame.add(step => body.x += speed * step); ```
Properties6
An hour count as the equivalent Seconds.
Label a plain number as Milliseconds.
A minute count as the equivalent Seconds.
Label a plain number as Seconds.
toMilliseconds: (value: SecondsA length of time in seconds. The unit every duration in the public API is expressed in - frame deltas, the fixed step, elapsed totals, timer limits. It is a `n…) => MillisecondsA length of time in milliseconds. The unit the platform speaks - `performance.now()`, frame timestamps, Web Audio scheduling. Convert at the boundary with Time…Convert a second length to Milliseconds.
toSeconds: (value: MillisecondsA length of time in milliseconds. The unit the platform speaks - `performance.now()`, frame timestamps, Web Audio scheduling. Convert at the boundary with Time…) => SecondsA length of time in seconds. The unit every duration in the public API is expressed in - frame deltas, the fixed step, elapsed totals, timer limits. It is a `n…Convert a millisecond length to Seconds.
Source