AnimationCallback2
class
class AnimationCallback2 implements AnimationCallback {
Animation _animation;
AnimationCallback2(this._animation);
void execute(int timestamp) {
if (_animation.update(timestamp)) {
// Schedule the next animation frame.
_animation.requestHandle = _animation.scheduler.requestAnimationFrame(_animation.callback, _animation.element);
} else {
_animation.requestHandle = null;
}
}
}
Implements
AnimationCallback
Constructors
new AnimationCallback2(Animation _animation) #
Creates a new Object instance.
Object instances have no meaningful state, and are only useful
through their identity. An Object instance is equal to itself
only.
docs inherited from Object
AnimationCallback2(this._animation);
Methods
void execute(int timestamp) #
Invokes the command.
@param timestamp the current timestamp
void execute(int timestamp) {
if (_animation.update(timestamp)) {
// Schedule the next animation frame.
_animation.requestHandle = _animation.scheduler.requestAnimationFrame(_animation.callback, _animation.element);
} else {
_animation.requestHandle = null;
}
}