mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
webxr: Implement reference space reset events (#33460)
* Initial interface implementation Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add event handler Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update FakeXRDevice interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement reset event Signed-off-by: Daniel Adams <msub2official@gmail.com> * Downcast bounded spaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update webxr commit Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Adjust DomRoot usage Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update manifest Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
parent
b0cae28c83
commit
f8e0fde044
18 changed files with 210 additions and 90 deletions
|
@ -17,7 +17,7 @@ interface FakeXRDevice {
|
|||
[Throws] undefined setFloorOrigin(FakeXRRigidTransformInit origin);
|
||||
undefined clearFloorOrigin();
|
||||
[Throws] undefined setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates);
|
||||
// undefined simulateResetPose();
|
||||
undefined simulateResetPose();
|
||||
|
||||
// Simulates devices focusing and blurring sessions.
|
||||
undefined simulateVisibilityChange(XRVisibilityState state);
|
||||
|
|
|
@ -16,5 +16,5 @@ enum XRReferenceSpaceType {
|
|||
interface XRReferenceSpace : XRSpace {
|
||||
[NewObject] XRReferenceSpace getOffsetReferenceSpace(XRRigidTransform originOffset);
|
||||
|
||||
// attribute EventHandler onreset;
|
||||
attribute EventHandler onreset;
|
||||
};
|
||||
|
|
17
components/script/dom/webidls/XRReferenceSpaceEvent.webidl
Normal file
17
components/script/dom/webidls/XRReferenceSpaceEvent.webidl
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://immersive-web.github.io/webxr/#xrreferencespaceevent-interface
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
interface XRReferenceSpaceEvent : Event {
|
||||
[Throws] constructor(DOMString type, XRReferenceSpaceEventInit eventInitDict);
|
||||
[SameObject] readonly attribute XRReferenceSpace referenceSpace;
|
||||
[SameObject] readonly attribute XRRigidTransform? transform;
|
||||
};
|
||||
|
||||
dictionary XRReferenceSpaceEventInit : EventInit {
|
||||
required XRReferenceSpace referenceSpace;
|
||||
XRRigidTransform? transform = null;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue