Skip to main content

Class: Time

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

Class to manage and track time-related information.

Constructors​

Constructor​

new Time(): Time

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

Creates an instance of Time.

Returns​

Time

Accessors​

deltaTimeInMilliseconds​

Get Signature​

get deltaTimeInMilliseconds(): number

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

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:132

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:221

Gets the current frames per second (FPS).

Returns​

number

The current FPS.


frames​

Get Signature​

get frames(): number

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

Gets the number of frames.

Returns​

number

The number of frames.


previousTimeInMilliseconds​

Get Signature​

get previousTimeInMilliseconds(): number

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

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:148

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:84

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:124

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:76

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:116

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:100

Gets the time in milliseconds.

Returns​

number

The time in milliseconds.


timeInSeconds​

Get Signature​

get timeInSeconds(): number

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

Gets the time in seconds.

Returns​

number

The time in seconds.


times​

Get Signature​

get times(): number[]

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

Gets the times array.

Returns​

number[]

The times array.


timeScale​

Get Signature​

get timeScale(): number

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

Gets the time scale.

Returns​

number

The time scale.

Set Signature​

set timeScale(value): void

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

Sets the time scale.

Parameters​
value​

number

The new time scale.

Returns​

void

Methods​

update()​

update(time): void

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

Updates the time-related information.

Parameters​

time​

number

The current time.

Returns​

void