⁘ common.time

TIME

A ticker singleton that allow for easy manipulation of time & frame. Mostly useful for animation, as well as debouncing.

go to → Members

Constructor

new TIME()

Members

read-onlydeltaTime :number

Current delta time. Up-to-date only in functions called on NEXT_TICK, otherwise represent the last frame' deltaTime.

timeScale :number

TODO

Methods

NextTickAdd(p_fn)

Add a callback to next frame's tick (if browser) or process.nextTick (if nodejs).

Parameters:
Name Type Description
p_fn function

NextTickRemove(p_fn)

Add a callback to next frame's tick (if browser) or process.nextTick (if nodejs).

Parameters:
Name Type Description
p_fn function

Members

write-onlystaticNEXT_TICK :function

TODO