WebXR Anchors Module: Difference between revisions
Jump to navigation
Jump to search
(Create empty page with category) |
(Add short summary and WebIDL) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category: | {{Infobox specification | ||
|title = WebXR Anchors Module | |||
|status = ED | |||
|last_updated = 30 September 2021 | |||
|editors = [[Piotr Bialecki]] | |||
|group = WG | |||
}} | |||
The WebXR Anchors module enables applications to ask the underlying XR system to track changes to a particular three-dimensional pose (position and orientation) as the system’s understanding of the world changes. This allows the application to adjust the location of the virtual objects that it placed in the scene in a way that helps with maintaining the illusion that the placed objects are really present in the user’s environment. | |||
==WebIDL== | |||
<syntaxhighlight lang="idl"> | |||
[SecureContext, Exposed=Window] | |||
interface XRAnchor { | |||
readonly attribute XRSpace anchorSpace; | |||
Promise<DOMString> requestPersistentHandle(); | |||
undefined delete(); | |||
}; | |||
partial interface XRFrame { | |||
Promise<XRAnchor> createAnchor(XRRigidTransform pose, XRSpace space); | |||
}; | |||
partial interface XRSession { | |||
Promise<XRAnchor> restorePersistentAnchor(DOMString uuid); | |||
Promise<undefined> deletePersistentAnchor(DOMString uuid); | |||
}; | |||
partial interface XRHitTestResult { | |||
Promise<XRAnchor> createAnchor(); | |||
}; | |||
[Exposed=Window] | |||
interface XRAnchorSet { | |||
readonly setlike<XRAnchor>; | |||
}; | |||
partial interface XRFrame { | |||
[SameObject] readonly attribute XRAnchorSet trackedAnchors; | |||
}; | |||
</syntaxhighlight> | |||
== External Links == | |||
* [https://immersive-web.github.io/anchors/ Specification] | |||
* [https://github.com/immersive-web/anchors GitHub] | |||
{{Navbox specifications}} | |||
[[Category:Specifications]] |
Latest revision as of 01:07, 1 March 2023
Status | ED |
---|---|
Last Updated | 30 September 2021 |
Editor(s) | Piotr Bialecki |
CG or WG? | WG |
The WebXR Anchors module enables applications to ask the underlying XR system to track changes to a particular three-dimensional pose (position and orientation) as the system’s understanding of the world changes. This allows the application to adjust the location of the virtual objects that it placed in the scene in a way that helps with maintaining the illusion that the placed objects are really present in the user’s environment.
WebIDL[edit]
[SecureContext, Exposed=Window]
interface XRAnchor {
readonly attribute XRSpace anchorSpace;
Promise<DOMString> requestPersistentHandle();
undefined delete();
};
partial interface XRFrame {
Promise<XRAnchor> createAnchor(XRRigidTransform pose, XRSpace space);
};
partial interface XRSession {
Promise<XRAnchor> restorePersistentAnchor(DOMString uuid);
Promise<undefined> deletePersistentAnchor(DOMString uuid);
};
partial interface XRHitTestResult {
Promise<XRAnchor> createAnchor();
};
[Exposed=Window]
interface XRAnchorSet {
readonly setlike<XRAnchor>;
};
partial interface XRFrame {
[SameObject] readonly attribute XRAnchorSet trackedAnchors;
};