w3c / gamepad

Gamepad
https://w3c.github.io/gamepad/
Other
138 stars 49 forks source link

Fold extensions.html into main spec #165

Open marcoscaceres opened 2 years ago

marcoscaceres commented 2 years ago

Having the extensions.html document is somewhat confusing, as it's not really a standards track document. It's also not really following the working group work mode (seems to serve as incubations).

I wonder if we should start thinking folding whatever we can from the extensions document into the main spec? If there are proposals that are not yet backed by multiple engines, we should figure out why and see how we can get those supported.

nondebug commented 2 years ago

Yes, I think we should remove extensions.html and work the features into the main spec.

Currently we have:

GamepadHand: This was added for VR, I'm not sure it makes sense to keep it in Gamepad API since XRInputSource has its own XRHandedness attribute. For most gamepads we don't have any way to know the handedness so this is typically useless.

GamepadHapticActuator: It's not clear to me if the GamepadHapticActuator described in the spec is actually implemented anywhere. I believe Firefox has IDL for it but I couldn't find a platform implementation that hooked it up to anything. If the pulse() API is unused then I think we should remove it in favor of playEffect().

GamepadHapticActuatorType: I want to deprecate this because our capability detection should be focused on the effects applications want to play, not the actuator that will play it. This is so we can emulate effects on actuators that aren't designed to support those effects, for instance rumble effects on Switch controllers. We want the spec to be less opinionated about compatibility in order to empower the user agent.

GamepadPose: Added for VR, I don't think we should include it in Gamepad API because it means tying the rate of motion inputs to the rate of gamepad inputs. WebXR already has its own XRPose. Also, we probably shouldn't expose pose information through Gamepad API for privacy reasons.

GamepadTouch: Added for Sony gamepads. This is implemented in Firefox, we should merge it into the main spec. Now that Steam Deck is here I think it would be good to have a POC supporting its touchpads before we merge it into the spec, just as proof that we didn't design it too specifically for Sony gamepads.

marcoscaceres commented 2 years ago

That above sounds like a pretty reasonable plan.