FrameTask

new FrameTask(during, after, duration)

Create a new frame task.
Parameters:
NameTypeDescription
duringfunctionFunction to run every frame
afterfunctionFunction to run after completion
durationnumberTotal length to run in seconds (use -1 to never stop)

Extends

Methods

init()

Initialize the task.
Overrides

isDone() → {boolean}

Check if the task is complete and can be removed.
Overrides
Returns:
Whether the task has completed
Type: 
boolean

stop()

Set the task's status to done so it will be removed.
Overrides

update(elapsed)

Update the task.
Parameters:
NameTypeDescription
elapsednumberTime since last update cycle in seconds
Overrides