Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Clock

Object for keeping track of time. This uses performance.now if it is available, otherwise it reverts to the less accurate Date.now.

Hierarchy

  • Clock

Index

Constructors

constructor

Properties

autoStart

autoStart: boolean

If set, starts the clock automatically when the first update is called. Default is true.

default

true

elapsedTime

elapsedTime: number

Keeps track of the total time that the clock has been running.

default

0

oldTime

oldTime: number

Holds the time at which the clock's start, getElapsedTime or getDelta methods were last called.

default

0

running

running: boolean

Whether the clock is running or not.

default

false

startTime

startTime: number

Holds the time at which the clock's start method was last called.

default

0

Methods

getDelta

  • getDelta(): number

getElapsedTime

  • getElapsedTime(): number

start

  • start(): void

stop

  • stop(): void

Generated using TypeDoc