W3C home > Mailing lists > Public > public-web-perf@w3.org > April 2012

[requestAnimationFrame] Specifying animationStartTime

From: Jatinder Mann <jmann@microsoft.com>
Date: Tue, 3 Apr 2012 18:53:54 +0000
To: "cam@mcc.id.au" <cam@mcc.id.au>, "James Robinson (jamesr@google.com)" <jamesr@google.com>, "public-web-perf@w3.org" <public-web-perf@w3.org>
Message-ID: <EE4C13A1D11CFA49A58343DE361B0B0417729614@TK5EX14MBXC253.redmond.corp.microsoft.com>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:01:11 UTC