Creates a new SDKTask.
Configuration options for the task.
Optionalname?: stringOptional display name for debugging.
Optionalrepeat?: booleanIf true, the task will run every update cycle.
The update stage in which this task should run.
The function to execute when the task runs.
OptionaltaskRunner?: SDKTaskRunnerOptional task runner; defaults to the global runner.
Whether this task has been destroyed and should no longer run.
OptionalnameOptional human-readable identifier useful for debugging and profiling.
If true, this task runs every update cycle without needing
to be manually scheduled.
Whether this task is currently scheduled to run. Non-repeating tasks must be scheduled before they will execute.
The update stage in which this task should run. Must be one of the static stage constants.
The function invoked when this task is executed. Implementations should be side-effecting and synchronous.
The SDKTaskRunner responsible for managing this task.
Static ReadonlyAnimateStage at which tasks perform animation updates.
Static ReadonlyCollectStage at which tasks handle input collection or preprocessing.
Static ReadonlyComputeStage at which tasks perform compute or simulation work.
Static ReadonlyPostStage at which tasks run after rendering is complete.
Static ReadonlyRenderStage at which tasks perform rendering-related updates.
Permanently destroys this task.
A destroyed task:
Called internally by SDKTaskRunner to execute this task if it is scheduled or if it is repeating.
Schedules this task to run during its update stage.
Non-repeating tasks must be scheduled to execute, while repeating tasks ignore manual scheduling.
Unschedules this task, preventing it from running. Ignores repeating tasks.
Represents a unit of work that can be scheduled to run during a specific stage of the SDK's update cycle.
Tasks may be:
A task is managed by an SDKTaskRunner, which handles scheduling and invoking tasks at their designated stage.
Example
See
SDKTaskRunner