- From: Matt Reynolds <notifications@github.com>
- Date: Wed, 07 Jul 2021 16:16:26 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/151/review/701518625@github.com>
@nondebug commented on this pull request.
> @@ -258,6 +295,81 @@ <h2>
different values (or values in a different order).
</dd>
</dl>
+ <h3>Receiving new input values</h3>
+ <p>
+ When the system receives new input values from a gamepad, run the following steps:
+ </p>
+ <ol>
+ <li>Let |gamepad:Gamepad| be the {{Gamepad}} instance in |navigator:Navigator|.{{[[gamepads]]}} representing the gamepad.
+ <li>Let |axisValues:sequence<unsigned long>| be the gamepad's <a>ordered array of logical axis input values</a>.
+ <li>Let |buttonValues:sequence<unsigned long>| be the gamepad's <a>ordered array of logical button input values</a>.
+ <li>Queue a task (where?) to <a>update gamepad state</a> for |gamepad| with |axisValues| and |buttonValues|.
+ </ol>
+ To <dfn>update gamepad state</dfn> for |gamepad| with an <a>ordered array of logical axis input values</a> |axisValues:sequence<unsigned long>| and an <a>ordered array of logical button input values</a> |buttonValues:sequence<unsigned long>|, run the following steps:
+ <ol>
+ <li>Let |now:DOMHighResTimeStamp| be a {{DOMHighResTimeStamp}} representing the current time.
+ <li>Let |gamepadsStart:DOMHighResTimeStamp| be the |navigationStart:DOMHighResTimeStamp| attribute of the {{PerformanceTiming}} interface.
+ <li>Set |gamepad|.{{Gamepad/timestamp}} to |now| − |gamepadsStart|.
I added the warning to the timestamp attribute definition
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/151#discussion_r665764337
Received on Wednesday, 7 July 2021 23:17:41 UTC