Skip to content

Commit

Permalink
Replace originOffset public member with getOffsetReferenceSpace method
Browse files Browse the repository at this point in the history
Remove originOffset as a public member of XRReferenceSpace. Add
getOffsetReferenceSpace() method for creating a new XRReferenceSpace
instead of mutating originOffset.

Bug: 958440
Change-Id: I9af336112df7a359a6ac02bd8d30e554ae540511
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595131
Commit-Queue: Will Cassella <cassew@google.com>
Reviewed-by: Bill Orr <billorr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659786}
  • Loading branch information
willcassella authored and Hexcles committed May 21, 2019
1 parent 31e7edc commit 6b146a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webxr/xrFrame_getPose.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
let space2 = spaces[1];

// Rotate 90 degrees about x axis, then move 1 meter along y axis.
space1.originOffset = new XRRigidTransform(
space1 = space1.getOffsetReferenceSpace(new XRRigidTransform(
DOMPointReadOnly.fromPoint({
x : 0,
y : 1,
Expand All @@ -50,10 +50,10 @@
z : 0,
w : Math.cos(radians / 2)
})
);
));

// Rotate 90 degrees about z axis, then move 1 meter along x axis.
space2.originOffset = new XRRigidTransform(
space2 = space2.getOffsetReferenceSpace(new XRRigidTransform(
DOMPointReadOnly.fromPoint({
x : 1,
y : 0,
Expand All @@ -66,7 +66,7 @@
z : Math.sin(radians / 2),
w : Math.cos(radians / 2)
})
);
));

let space1_from_space2 = xrFrame.getPose(space1, space2);
const EXPECTED_POSE_MATRIX = [
Expand Down

0 comments on commit 6b146a9

Please sign in to comment.