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
Define initial set of generic profiles #738
Conversation
Thanks for filing this @toji! Can you share more about your concern with a UA returning both A few points that come to mind for discussion:
|
Pinging @TrevorFSmith and @NellWaliczek to share their thoughts here. |
I support this design. In PotassiumES the input system has two main jobs at runtime: 🌸 Map sets of low level input events into higher level actions Developers write a JSON file that defines the input->action mapping (with recognizers and filters in the mix) and then at runtime the app framework polls the input system in the game loop. 🌸 Give users with unusual or unexpected hardware a way to map their own inputs to actions (still in development) The web app could store this custom map using browser storage or some back-end storage and a cookie or login to recall the map. The user can also download the file for use at a later time. Developers add a UI element to their app that brings up the custom mapping UI with a file-load/drop-target for previously created mapping files. So, with this design PotassiumES's input system could iterate through to pick the profile with the highest specificity and route events from the XRInputSource into common input events that app developers and end users with custom hw can map to actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this list. One follow-up comment that can be addressed after VR complete.
input-explainer.md
Outdated
|
||
The strings returned in the `profiles` array of an `XRInputSource` describe the device being used with varying levels of detail, ranging from exactly identifying the device to only giving a broad description of it's shape and capabilities. It's highly recommended that, when applicable, the last profile in the array be from a list of well-known "generic" profiles, given below. | ||
|
||
- **"button-controller":** A controller with at least one button/trigger but no touchpad or thumbstick. Controllers with this profile must not use the `xr-standard` Gamepad mapping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Controllers with this profile must not use the
xr-standard
Gamepad mapping.
Now that we have named profiles, this restriction is increasingly weird to me. I get that it originally came from the need to have a primary button for triggering the select event. It just seems like we could probably cover that requirement without contorting ourselves around the need for a button in the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with addressing this as a separate issue post-VR complete, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I meant to revisit this after the latest changes to the xr-standard
mapping. Devices with this profile should identify themselves as xr-standard
now. Fixed!
This supporting PR for #695 defines an initial set of generic
XRInputSource
profiles that are recommended to be used as a last-resort fallback when describing a device. It's very controller-centric right now, but I don't really object to adding additional profiles like "hand" if everyone things that's useful to define right now.