Skip to main content

Class: Time

Defined in: common/time/Time.ts:4

Class to manage and track time-related information.

Constructors

Constructor

new Time(): Time

Defined in: common/time/Time.ts:26

Creates an instance of Time.

Returns

Time

Accessors

deltaTimeInMilliseconds

Get Signature

get deltaTimeInMilliseconds(): number

Defined in: common/time/Time.ts:73

Gets the delta time in milliseconds.

Returns

number

The delta time in milliseconds.


deltaTimeInSeconds

Get Signature

get deltaTimeInSeconds(): number

Defined in: common/time/Time.ts:113

Gets the delta time in seconds.

Returns

number

The delta time in seconds.


fps

Get Signature

get fps(): number

Defined in: common/time/Time.ts:189

Gets the current frames per second (FPS).

Returns

number

The current FPS.


frames

Get Signature

get frames(): number

Defined in: common/time/Time.ts:49

Gets the number of frames.

Returns

number

The number of frames.


previousTimeInMilliseconds

Get Signature

get previousTimeInMilliseconds(): number

Defined in: common/time/Time.ts:89

Gets the previous time in milliseconds.

Returns

number

The previous time in milliseconds.


previousTimeInSeconds

Get Signature

get previousTimeInSeconds(): number

Defined in: common/time/Time.ts:129

Gets the previous time in seconds.

Returns

number

The previous time in seconds.


rawDeltaTimeInMilliseconds

Get Signature

get rawDeltaTimeInMilliseconds(): number

Defined in: common/time/Time.ts:65

Gets the raw delta time in milliseconds.

Returns

number

The raw delta time in milliseconds.


rawDeltaTimeInSeconds

Get Signature

get rawDeltaTimeInSeconds(): number

Defined in: common/time/Time.ts:105

Gets the raw delta time in seconds.

Returns

number

The raw delta time in seconds.


rawTimeInMilliseconds

Get Signature

get rawTimeInMilliseconds(): number

Defined in: common/time/Time.ts:57

Gets the raw time in milliseconds.

Returns

number

The raw time in milliseconds.


rawTimeInSeconds

Get Signature

get rawTimeInSeconds(): number

Defined in: common/time/Time.ts:97

Gets the raw time in seconds.

Returns

number

The raw time in seconds.


timeInMilliseconds

Get Signature

get timeInMilliseconds(): number

Defined in: common/time/Time.ts:81

Gets the time in milliseconds.

Returns

number

The time in milliseconds.


timeInSeconds

Get Signature

get timeInSeconds(): number

Defined in: common/time/Time.ts:121

Gets the time in seconds.

Returns

number

The time in seconds.


times

Get Signature

get times(): number[]

Defined in: common/time/Time.ts:153

Gets the times array.

Returns

number[]

The times array.


timeScale

Get Signature

get timeScale(): number

Defined in: common/time/Time.ts:137

Gets the time scale.

Returns

number

The time scale.

Set Signature

set timeScale(value): void

Defined in: common/time/Time.ts:145

Sets the time scale.

Parameters
value

number

The new time scale.

Returns

void

Methods

update()

update(time): void

Defined in: common/time/Time.ts:161

Updates the time-related information.

Parameters

time

number

The current time.

Returns

void