new FrameTask(during, after, duration)
Create a new frame task.
Parameters:
Name | Type | Description |
---|---|---|
during | function | Function to run every frame |
after | function | Function to run after completion |
duration | number | Total length to run in seconds (use -1 to never stop) |
- Source
Extends
Methods
init()
Initialize the task.
- Overrides
- Source
isDone() → {boolean}
Check if the task is complete and can be removed.
- Overrides
- Source
Returns:
Whether the task has completed
- Type:
- boolean
stop()
Set the task's status to done so it will be removed.
- Overrides
- Source
update(elapsed)
Update the task.
Parameters:
Name | Type | Description |
---|---|---|
elapsed | number | Time since last update cycle in seconds |
- Overrides
- Source