Module: time

Time API.

Summary

Methods

Detailed Description

Methods

animate(from, to, timeout, anim_cb) → {number}

Animate value.
Parameters:
Name Type Description
from number Value to animate from
to number Value to animate to
timeout number Period of time to animate the value
anim_cb anim_callback Animation callback
Returns:
Animator ID
Type
number
Source:

clear_animation(id)

Clear the animation.
Parameters:
Name Type Description
id number Animator ID
Source:

clear_timeout(id)

Clear the timeout.
Parameters:
Name Type Description
id number Timeout ID
Source:

get_timeline() → {number}

Get the engine's timeline (number of seconds after engine's initialization).
Returns:
Timeline
Type
number
Source:

set_timeout(callback, time) → {number}

Set a new timeout. this method has the same behavior as window.setTimeout(), except it uses engine's timeline.
Parameters:
Name Type Description
callback timeout_callback Timeout callback
time number Timeout
Returns:
Timeout ID
Type
number
Source: