- From: Gabriel Brito <notifications@github.com>
- Date: Mon, 27 Nov 2023 11:51:48 -0800
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/190/review/1751245334@github.com>
@gabrielsanbrito commented on this pull request. > + Promise<boolean> pulse(double value, double duration); + }; + </pre> + <dt> + <dfn>pulse()</dfn> method + </dt> + <dd> + <p> + <code>pulse()</code> applies a <var>value</var> to the actuator for + <var>duration</var> milliseconds. The <var>value</var> passed to + <code>pulse()</code> is clamped to limits defined by the actuator + type. The returned Promise will resolve <code>true</code> once the + pulse has completed. + </p> + <p> + Repeated calls to <code>pulse()</code> override the previous I didn't write this part of the spec. This `pulse()` definition is already in the [Gamepad Extensions spec](https://w3c.github.io/gamepad/extensions.html#dom-gamepadhapticactuator-pulse). Although, my understanding is that it is not clear whether `p1` would be rejected or resolved with `false`. I think that by "override" the writer meant that any currently playing pulse effect (`p1`) should be immediately preempted, and `p2` should start playing right away I think that it should look something like: - If `p1` is preempted, resolve with `true`, because it was playing anyways; - If `p1` didn't start playing at all, resolve with `false` - If `pulse` is not supported for any reason, reject the promise with an error. However, since this exact wording is already in the extensions document, I would suggest leaving it as it is right now to focus on moving `vibrationActuator` to the main spec. Later on we can discuss further on how to better specify `pulse` and the `hapticActuators` array. What do you think? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/gamepad/pull/190#discussion_r1406675782 You are receiving this because you are subscribed to this thread. Message ID: <w3c/gamepad/pull/190/review/1751245334@github.com>
Received on Monday, 27 November 2023 19:51:54 UTC