Skip to content

Commit

Permalink
Rename mojo_from_floor to mojo_from_stage
Browse files Browse the repository at this point in the history
In preparation for actually sending up mojo_from_floor data, this
renames `mojo_from_floor` in VRStageParameters to `mojo_from_stage` to
reflect what it actually is.

Bug: 390216623
Change-Id: I3428517b34e614c1c35e206bfafe98893f042fa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6183158
Commit-Queue: Alexander Cooper <[email protected]>
Reviewed-by: Elly FJ <[email protected]>
Reviewed-by: Fred Shih <[email protected]>
Reviewed-by: Piotr Bialecki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1410694}
  • Loading branch information
alcooper91 authored and chromium-wpt-export-bot committed Jan 24, 2025
1 parent 2eafc9a commit d852a80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resources/chromium/webxr-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import {GamepadHand, GamepadMapping} from '/gen/device/gamepad/public/mojom/game
// This polyfill library implements the WebXR Test API as specified here:
// https://github.com/immersive-web/webxr-test-api

const defaultMojoFromFloor = {
const defaultMojoFromStage = {
matrix: [1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, -1.65, 0, 1]
};
const default_stage_parameters = {
mojoFromFloor: defaultMojoFromFloor,
mojoFromStage: defaultMojoFromStage,
bounds: null
};

Expand Down Expand Up @@ -512,8 +512,8 @@ class MockRuntime {
this.stageParameters_.bounds = this.bounds_;
}

// floorOrigin is passed in as mojoFromFloor.
this.stageParameters_.mojoFromFloor =
// floorOrigin is passed in as mojoFromStage.
this.stageParameters_.mojoFromStage =
{matrix: getMatrixFromTransform(floorOrigin)};

this._onStageParametersUpdated();
Expand Down Expand Up @@ -1640,11 +1640,11 @@ class MockRuntime {
case vrMojom.XRReferenceSpaceType.kLocal:
return XRMathHelper.identity();
case vrMojom.XRReferenceSpaceType.kLocalFloor:
if (this.stageParameters_ == null || this.stageParameters_.mojoFromFloor == null) {
if (this.stageParameters_ == null || this.stageParameters_.mojoFromStage == null) {
console.warn("Standing transform not available.");
return null;
}
return this.stageParameters_.mojoFromFloor.matrix;
return this.stageParameters_.mojoFromStage.matrix;
case vrMojom.XRReferenceSpaceType.kViewer:
return mojo_from_viewer;
case vrMojom.XRReferenceSpaceType.kBoundedFloor:
Expand Down

0 comments on commit d852a80

Please sign in to comment.