Creates an instance of AnimationFrameScheduler.
The callback to be executed when the next animation frame is available.
Protected_Indicates whether the scheduler is frozen.
ProtectedallowIndicates whether the scheduler allows scheduling (scheduleCore() call) when it is already scheduled. This can be overridden in subclasses to change the default behavior.
ProtectedanimationHandle for the scheduled animation frame.
This is set to null when no animation frame is scheduled.
ProtectedcallbackThe callback function to be executed by the scheduler.
ProtectedshouldIndicates whether the scheduler should be scheduled on unfreeze.
Indicates whether the scheduler is frozen.
Indicates whether the scheduler is currently scheduled.
ProtectedisChecks if the scheduler is currently scheduled.
Cancels the scheduled callback.
ProtectedcancelCancels the scheduled animation frame. If no animation frame is scheduled, it does nothing.
ProtectedexecuteExecutes the callback immediately.
Freezes the scheduler, preventing it from executing the callback. If the scheduler is currently scheduled, it will be canceled and then rescheduled on unfreeze(). If the scheduler is already frozen, this method does nothing.
Schedules the callback to be executed. If the scheduler is already scheduled, it does nothing. If the scheduler is frozen, it will be scheduled on unfreeze().
ProtectedscheduleSchedules the callback to be executed on the next animation frame. If an animation frame is already scheduled, it does nothing.
Unfreezes the scheduler, allowing it to execute the callback again. If the scheduler was frozen with a scheduled callback, it will be rescheduled. If schedule() was called while frozen, it will be scheduled now. If the scheduler is not frozen, this method does nothing.
Protected StaticcallCalls the provided callback function.
The callback function to be executed.
StaticsingleSchedules a single-shot task using requestAnimationFrame.
The callback to be executed when the next animation frame is available.
Scheduler that uses the browser's
requestAnimationFrameto schedule tasks.