API Docs for: v0.1.0
Show:

Clock Class

Extends Object
Defined in: src\utils\Clock.js:3

High performance clock, based on mrdoob's Three.js clock, but with tweaks.

Constructor

Clock

()

Item Index

Methods

getDelta

() Number

Gets the difference in time since getDelta() was called last

Returns:

Number:

Ellapsed time since last call in seconds

Example:

 clock.getDelta();

getElapsedTime

() Number

Gets the total time that the timer has been running

Returns:

Number:

Total ellapsed time in ms

Example:

 clock.getElapsedTime();

now

() Number

Gets the current time from the underlying timer

Returns:

Number:

The current timestamp

Example:

 clock.now();

reset

() Clock chainable

Resets the timer

Returns:

Clock:

Returns itself.

Example:

 clock.reset();

start

() Clock chainable

Starts the timer

Returns:

Clock:

Returns itself.

Example:

 clock.start();

stop

() Clock chainable

Stops the timer

Returns:

Clock:

Returns itself.

Example:

 clock.stop();