Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd experimental hand tracking support #26316
Conversation
highfive
commented
Apr 25, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 25, 2020
|
r? @jdm @asajeffrey |
|
|
|
This can be landed now. The actual feature is behind a pref, and it doesn't work anyway without the webxr openxr patches (servo/webxr#163), but we can get the impl in-tree at least. |
|
Just minor nits. Feel free to ignore them and r=me. |
| @@ -299,6 +299,8 @@ mod gen { | |||
| test: bool, | |||
| #[serde(default)] | |||
| glwindow: bool, | |||
| #[serde(default)] | |||
| hand: bool, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 27, 2020
Author
Member
done, dom.webxr.hands.enabled (the API is called webxr-hands-input, so I picked this option instead)
| @@ -881,6 +882,58 @@ where | |||
| } | |||
| } | |||
|
|
|||
| unsafe impl<J> JSTraceable for Hand<J> | |||
This comment has been minimized.
This comment has been minimized.
asajeffrey
Apr 27, 2020
Member
Hmm, it would be nice if we could derive this, it'll be very easy to mess this up down the road :(
This comment has been minimized.
This comment has been minimized.
| @@ -24,4 +24,7 @@ interface XRInputSource { | |||
| [SameObject] readonly attribute XRSpace? gripSpace; | |||
| // [SameObject] readonly attribute Gamepad? gamepad; | |||
| /* [SameObject] */ readonly attribute /* FrozenArray<DOMString> */ any profiles; | |||
|
|
|||
| [Pref="dom.webxr.hand"] | |||
| readonly attribute XRHand? hand; | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 27, 2020
Author
Member
An input source only has one hand. If your input source has multiple hands, it might be time to call your doctor and/or plastic surgeon.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Apr 27, 2020
Author
Member
(This also matches with gamepad -- a single input source is a single controller in a single hand, and it can have one gamepad and one associated hand)
|
@bors-servo r=asajeffrey |
|
|
Add experimental hand tracking support Depends on servo/webxr#162 Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream). This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes. If folks want to try this out, patch in servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this is an experimental API <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
|
Add experimental hand tracking support Depends on servo/webxr#162 Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream). This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes. If folks want to try this out, patch in servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this is an experimental API <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry
|
Add experimental hand tracking support Depends on servo/webxr#162 Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream). This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes. If folks want to try this out, patch in servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this is an experimental API <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Add experimental hand tracking support Depends on servo/webxr#162 Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream). This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes. If folks want to try this out, patch in servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this is an experimental API <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry
|
Add experimental hand tracking support Depends on servo/webxr#162 Adds support for [the experimental hand tracking API](https://github.com/immersive-web/webxr-hands-input/blob/master/explainer.md) (with some tweaks made that I intend to upstream). This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes. If folks want to try this out, patch in servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the `dom.webxr.hand` pref. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this is an experimental API <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry |
|
|

Manishearth commentedApr 25, 2020
•
edited
Depends on servo/webxr#162
Adds support for the experimental hand tracking API (with some tweaks made that I intend to upstream).
This needs servo/webxr#163 to actually run on any backend, however that depends on some openxrs changes.
If folks want to try this out, patch in
servo/webxr#163 and run https://manishearth.net/sand/three.js/examples/webxr_vr_paint.html . You also need to toggle the
dom.webxr.handpref../mach build -ddoes not report any errors./mach test-tidydoes not report any errors