Skip to content
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

Implement non-XR gamepad discovery and input #31179

Closed
msub2 opened this issue Jan 25, 2024 · 1 comment · Fixed by #31200
Closed

Implement non-XR gamepad discovery and input #31179

msub2 opened this issue Jan 25, 2024 · 1 comment · Fixed by #31200
Assignees
Labels
A-constellation Involves the constellation A-content/dom Interacting with the DOM from web content A-embedding

Comments

@msub2
Copy link
Contributor

msub2 commented Jan 25, 2024

Recently I've been doing some work on Servo's WebXR crate, but while doing that I noticed that the Gamepad API wasn't supported for regular controllers and thought it would be a fun project to take on!

Spec: https://www.w3.org/TR/gamepad/

There is some existing code in Servo already for Gamepads, but it was added for use with WebVR/WebXR and as such doesn't support discovery/communication with regular game controllers. My plan is to utilize GilRs (Game Input Library for Rust) as the backend for gamepad discovery/communication. From my understanding this will also involve creating a new task source for communication with Constellation and handling polling and such on the embedder's event loop.

@gterzian gterzian added A-content/dom Interacting with the DOM from web content A-embedding A-constellation Involves the constellation labels Jan 26, 2024
@matlu
Copy link

matlu commented Jan 26, 2024

Great idea and efforts!
Once more things have landed it would be good to add the WPT tests for Gamepad to https://wpt.servo.org/
Here is current status for Servo based on WPT. https://wpt.fyi/results/gamepad?label=master&label=experimental&product=chrome&product=servo&product=edge&product=safari&aligned

image

@msub2 msub2 changed the title Fully Implement Gamepad API Implement non-XR gamepad discovery and input Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-constellation Involves the constellation A-content/dom Interacting with the DOM from web content A-embedding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants