-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appropriate way to contribute a web API interface that is changing (Gamepad hapticActuators -> vibrationActuator) #4089
Comments
This API should probably not have been made stable in the first place, but fortunately none of these new additions require a breaking change to the already existing API. Generally speaking we follow the spec no matter the browser support, but non-stable specifications should never override stable ones. In this case adding all this new API unstably shouldn't be an issue and we can go ahead and deprecate the old API. Let me know if you have any issues accomplishing any of this. |
@daxpedda thanks for the guidance, makes sense! I'll dig into adding the new API. Is there any reference/guidance for how to deprecate the old API? |
To deprecate an API you just slap the |
The API that currently exists in the repo has been deprecated and the new API has been added. This allows gamepads to be rumbled Spec: https://w3c.github.io/gamepad/ More details: rustwasm#4089
The API that currently exists in the repo has been deprecated and the new API has been added. This allows gamepads to be rumbled Spec: https://w3c.github.io/gamepad/ More details: rustwasm#4089
The API that currently exists in the repo has been deprecated and the new API has been added. This allows gamepads to be rumbled Spec: https://w3c.github.io/gamepad/ More details: rustwasm#4089
Summary
The Gamepad specification is in draft for for how force feedback (a.k.a. rumble, a.k.a. vibration) works. The specification within web-sys for
hapticActuators
is in Editor's Draft as of 09 August 2024 to change to:Notice the last line:
[SameObject] readonly attribute GamepadHapticActuator vibrationActuator;
hapticActuators
has changed tovibrationActuator
, and then the API for what that attribute is, aGamepadHapticActuator
, has a new API:This definition differs from what's currently enabled in GamepadHapticActuator.webidl
So my question is this: how does one go about contributing a change to an existing specification in this scenario? Would we add the new ones side-by-side with the existing? Or something else?
Additional Details
hapticActuators
API is only supported in Firefox (MDN) and is marked as experimental; it does not work from my testingvibrationActuator
api is supported in Chrome, Edge, Opera, and Safari (MDN) and functions from my testinghapticActuators
appears to be part of an older specification extensionBecause many browsers do support the
vibrationActuator
property and it's in the Gamepad spec draft, it seems like it's the future standard; it'd be awesome is web-sys supported it for implementing rumble for controllers in WASM; that's the core motivation for this addition/change.I'm happy to do the work to contribute this, but I figure since it's something changing, I should open an issue to start the conversation and get guidance. Thank you!
The text was updated successfully, but these errors were encountered: