[requestAnimationFrame] Specifying animationStartTime

The latest proposal to change the type of the first parameter of the requestAnimationFrame callback to DOMHighResTimeStamp fulfills the need for a monotonically increasing time base. Further, performance.now() provides the ability to compare the current time with other timestamps in the new time base.

In addition to these changes, to make it easier to synchronize multiple animations, the spec should also specify animationStartTime.  While, with ISSUE-2 outstanding, the time parameter for the callback is not defined, we feel the animationStartTime should be the same value. Though, that time can be obtained by storing the first parameter of the requestAnimationFrame callback into a global variable, it would seem that directly referencing animationStartTime would be easier in some situations. This will help in scenarios where you want to define a 'start time' for multiple animations, or if you wanted to run script immediately after the last frame of animation.

Thanks,
Jatinder

Received on Tuesday, 3 April 2012 18:54:33 UTC