AnimationScheduler abstract class
This class provides task scheduling for animations. Any exceptions thrown by the command objects executed by the scheduler will be passed to the {@link com.google.gwt.core.client.GWT.UncaughtExceptionHandler} if one is installed.
abstract class AnimationScheduler { /** * Returns the default implementation of the AnimationScheduler API. */ factory AnimationScheduler.Instance() { return new AnimationSchedulerImpl.Instance(); } AnimationScheduler(); /** * Schedule an animation, letting the browser decide when to trigger the next * step in the animation. * * <p> * Using this method instead of a timeout is preferred because the browser is * in the best position to decide how frequently to trigger the callback for * an animation of the specified element. The browser can balance multiple * animations and trigger callbacks at the optimal rate for smooth * performance. * </p> * * @param callback the callback to fire * @return a handle to the requested animation frame * @param element the element being animated */ AnimationHandle requestAnimationFrame(AnimationCallback callback, [dart_html.Element element = null]); }
Subclasses
Constructors
new AnimationScheduler() #
factory AnimationScheduler.Instance() #
Returns the default implementation of the AnimationScheduler API.
factory AnimationScheduler.Instance() { return new AnimationSchedulerImpl.Instance(); }
Methods
abstract AnimationHandle requestAnimationFrame(AnimationCallback callback, [Element element = null]) #
Schedule an animation, letting the browser decide when to trigger the next step in the animation.
Using this method instead of a timeout is preferred because the browser is in the best position to decide how frequently to trigger the callback for an animation of the specified element. The browser can balance multiple animations and trigger callbacks at the optimal rate for smooth performance.
@param callback the callback to fire @return a handle to the requested animation frame @param element the element being animated