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

Properly support transforms in WebXR #23097

Merged
merged 7 commits into from Mar 27, 2019
Merged

Conversation

@Manishearth
Copy link
Member

Manishearth commented Mar 25, 2019

Still need to test this

There are also a bunch of fixmes that I should get to in this PR.


This change is Reviewable

@highfive
Copy link

highfive commented Mar 25, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/xrrenderstate.rs, components/script/dom/webidls/XRSession.webidl, components/script/dom/vreyeparameters.rs, components/script/dom/xrrigidtransform.rs, components/script/dom/vrdisplay.rs and 8 more
  • @KiChjang: components/script/dom/xrrenderstate.rs, components/script/dom/webidls/XRSession.webidl, components/script/dom/vreyeparameters.rs, components/script/dom/xrrigidtransform.rs, components/script/dom/vrdisplay.rs and 8 more
@highfive
Copy link

highfive commented Mar 25, 2019

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@avadacatavra
Copy link
Contributor

avadacatavra commented Mar 26, 2019

@Manishearth is this ready for a first pass review?

@Manishearth Manishearth force-pushed the Manishearth:transforms branch from 5ecd4ee to a42692d Mar 26, 2019
@Manishearth
Copy link
Member Author

Manishearth commented Mar 26, 2019

Sure!

@Manishearth Manishearth force-pushed the Manishearth:transforms branch 2 times, most recently from 964c7d7 to 84dc98d Mar 26, 2019
@Manishearth
Copy link
Member Author

Manishearth commented Mar 26, 2019

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.

@Manishearth Manishearth force-pushed the Manishearth:transforms branch from d9956fc to 4f128e4 Mar 26, 2019
Copy link
Member

asajeffrey left a comment

LGTM, just some minor nits and comments.

// Do nothing
}
}

This comment has been minimized.

@asajeffrey

asajeffrey Mar 26, 2019

Member

Nit: unsafe_no_jsmanaged_fields!?

This comment has been minimized.

@Manishearth

Manishearth Mar 26, 2019

Author Member

IIRC it doesn't work with generics that well? I'll try.

}
let pose = reference.get_viewer_pose(&self.data);
let left = XRView::new(
&self.global(),

This comment has been minimized.

@asajeffrey

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.

@Manishearth

Manishearth Mar 26, 2019

Author Member

Chrome updates in-place. This change can be made.

This comment has been minimized.

@Manishearth

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.

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.

@asajeffrey

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.

@Manishearth

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.

@jdm jdm assigned asajeffrey and unassigned avadacatavra Mar 26, 2019
@Manishearth Manishearth changed the title [WIP] Properly support transforms in WebXR Properly support transforms in WebXR Mar 26, 2019
@Manishearth
Copy link
Member Author

Manishearth commented Mar 26, 2019

@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
Copy link
Contributor

bors-servo commented Mar 26, 2019

📌 Commit 240b5e7 has been approved by asajeffrey

@Manishearth
Copy link
Member Author

Manishearth commented Mar 26, 2019

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2019

📌 Commit 2e62805 has been approved by asajeffrey

@Manishearth
Copy link
Member Author

Manishearth commented Mar 27, 2019

@bors-servo p=1

bors seems to be sleepy?

@bors-servo
Copy link
Contributor

bors-servo commented Mar 27, 2019

Testing commit 2e62805 with merge 364d0e0...

bors-servo added a commit that referenced this pull request Mar 27, 2019
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
Copy link
Contributor

bors-servo commented Mar 27, 2019

💔 Test failed - status-taskcluster

@Manishearth
Copy link
Member Author

Manishearth commented Mar 27, 2019

@bors-servo retry

BHM failure? (Will look closer when I'm back home)

@jdm
Copy link
Member

jdm commented Mar 27, 2019

Filed #23109 for that failure.

@bors-servo
Copy link
Contributor

bors-servo commented Mar 27, 2019

Testing commit 2e62805 with merge 3c27dc9...

bors-servo added a commit that referenced this pull request Mar 27, 2019
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
Copy link
Contributor

bors-servo commented Mar 27, 2019

@bors-servo bors-servo merged commit 2e62805 into servo:master Mar 27, 2019
4 checks passed
4 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
@Manishearth Manishearth deleted the Manishearth:transforms branch Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.