aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-05-30 14:50:25 -0700
committerManish Goregaokar <manishsmail@gmail.com>2019-05-30 19:04:08 -0700
commitd044a792f1cc664492f646f9c6eddf427d82413e (patch)
tree01333cf367bafddd062d68638dbe1e42880cd908 /components
parent366aa78e55fef850390ac143aba9032fe8f04f73 (diff)
downloadservo-d044a792f1cc664492f646f9c6eddf427d82413e.tar.gz
servo-d044a792f1cc664492f646f9c6eddf427d82413e.zip
Normalize rotations
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/xrspace.rs3
-rw-r--r--components/script/dom/xrtest.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/xrspace.rs b/components/script/dom/xrspace.rs
index 30f9246c354..171c0621dc8 100644
--- a/components/script/dom/xrspace.rs
+++ b/components/script/dom/xrspace.rs
@@ -99,7 +99,8 @@ impl XRSpace {
orient[1] as f64,
orient[2] as f64,
orient[3] as f64,
- );
+ )
+ .normalize();
RigidTransform3D::new(rotation, translation)
}
diff --git a/components/script/dom/xrtest.rs b/components/script/dom/xrtest.rs
index 6c895e226cb..3484badf1a7 100644
--- a/components/script/dom/xrtest.rs
+++ b/components/script/dom/xrtest.rs
@@ -56,7 +56,8 @@ impl XRTestMethods for XRTest {
.as_window()
.webvr_thread()
.unwrap()
- .send(WebVRMsg::CreateMockDisplay);
+ .send(WebVRMsg::CreateMockDisplay)
+ .unwrap();
p.resolve_native(&FakeXRDeviceController::new(&self.global()));
p