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 upProperly support transforms in WebXR #23097
Conversation
highfive
commented
Mar 25, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 25, 2019
|
@Manishearth is this ready for a first pass review? |
|
Sure! |
964c7d7
to
84dc98d
|
This is tested. It can be merged as-is if someone reviews it first (@asajeffrey or @jdm ?) but I also have a bunch of improvements I wish to land. |
|
LGTM, just some minor nits and comments. |
| // Do nothing | ||
| } | ||
| } | ||
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| } | ||
| let pose = reference.get_viewer_pose(&self.data); | ||
| let left = XRView::new( | ||
| &self.global(), |
This comment has been minimized.
This comment has been minimized.
asajeffrey
Mar 26, 2019
Member
This is building new XRView objects every time it is called? Is that required by the spec, or are we allowed to update in place?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Manishearth
Mar 26, 2019
Author
Member
Actually, I'd rather not fix this just yet, I'll bring it up on the spec. This is observable.
This comment has been minimized.
This comment has been minimized.
| pub fn matrix(&self) -> Transform3D<f64> { | ||
| // Spec says the orientation applies first, | ||
| // so post-multiply (?) | ||
| self.translate.post_mul(&self.rotate.to_transform()) |
This comment has been minimized.
This comment has been minimized.
asajeffrey
Mar 26, 2019
Member
Using Euclid typed units to keep track of coordinate spaces would make this (?) less speculative!
This comment has been minimized.
This comment has been minimized.
Manishearth
Mar 26, 2019
Author
Member
It doesn't help since there's no term for the intermediate space, and these transforms can be applied in multiple different ways.
| @@ -57,7 +57,7 @@ impl XRViewportMethods for XRViewport { | |||
|
|
|||
| /// https://immersive-web.github.io/webxr/#dom-xrviewport-width | |||
| fn Width(&self) -> i32 { | |||
| self.height as i32 | |||
| self.width as i32 | |||
| } | |||
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r=asajeffrey Most of the TODOs are better done after servo/euclid#328 lands, since that lets us simplify a bunch of the code here. |
|
|
|
@bors-servo r=asajeffrey |
|
|
|
@bors-servo p=1 bors seems to be sleepy? |
Properly support transforms in WebXR Still need to test this There are also a bunch of fixmes that I should get to in this PR. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23097) <!-- Reviewable:end -->
|
|
|
@bors-servo retry BHM failure? (Will look closer when I'm back home) |
|
Filed #23109 for that failure. |
Properly support transforms in WebXR Still need to test this There are also a bunch of fixmes that I should get to in this PR. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23097) <!-- Reviewable:end -->
|
|
Manishearth commentedMar 25, 2019
•
edited
Still need to test this
There are also a bunch of fixmes that I should get to in this PR.
This change is