Update FakeXRDevice to support updating bounds (#33271)

* Update FakeXRDevice to support updating bounds

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec link

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Mark secondaryViews as optional in FakeXRDevice.setViews

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-09-01 11:58:32 +00:00 committed by GitHub
parent 3453d9fdad
commit 9fdaf9bf0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 56 additions and 66 deletions

View file

@ -6,29 +6,31 @@
[Exposed=Window, Pref="dom.webxr.test"]
interface FakeXRDevice {
// Sets the values to be used for subsequent
// requestAnimationFrame() callbacks.
[Throws] undefined setViews(sequence<FakeXRViewInit> views);
[Throws] undefined setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false);
undefined clearViewerOrigin();
[Throws] undefined setFloorOrigin(FakeXRRigidTransformInit origin);
undefined clearFloorOrigin();
// // Simulates devices focusing and blurring sessions.
undefined simulateVisibilityChange(XRVisibilityState state);
// void setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates);
[Throws] FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init);
// Sets the values to be used for subsequent requestAnimationFrame() callbacks.
[Throws] undefined setViews(sequence<FakeXRViewInit> views, optional sequence<FakeXRViewInit> secondaryViews);
// behaves as if device was disconnected
Promise<undefined> disconnect();
[Throws] undefined setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false);
undefined clearViewerOrigin();
[Throws] undefined setFloorOrigin(FakeXRRigidTransformInit origin);
undefined clearFloorOrigin();
[Throws] undefined setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates);
// undefined simulateResetPose();
// Simulates devices focusing and blurring sessions.
undefined simulateVisibilityChange(XRVisibilityState state);
[Throws] FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init);
// Hit test extensions:
[Throws] undefined setWorld(FakeXRWorldInit world);
undefined clearWorld();
// Depth sensing extensions:
// undefined setDepthSensingData(FakeXRDepthSensingDataInit depthSensingData);
// undefined clearDepthSensingData();
};
// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport