WebXR Augmented Reality Module: Difference between revisions

From WebXR Wiki
Jump to navigation Jump to search
(Create empty page with category)
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Standards]]
{{Infobox specification
|title = WebXR Augmented Reality Module
|status = CR
|last_updated = 2 November 2022
|editors = [[Brandon Jones]], [[Manish Goregaokar]], [[Rik Cabanier]]
|former_editors = [[Nell Waliczek]]
|group = WG
}}
 
The WebXR Augmented Reality Module expands the [[WebXR Device API]] with functionality specific to AR devices, such as defining blend modes for rendered pixels and interaction modes to accommodate different AR device form factors, i.e. phone screen vs. head-mounted.
 
== WebIDL ==
<syntaxhighlight lang="idl">
enum XREnvironmentBlendMode {
  "opaque",
  "alpha-blend",
  "additive"
};
 
partial interface XRSession {
  // Attributes
  readonly attribute XREnvironmentBlendMode environmentBlendMode;
};
 
enum XRInteractionMode {
    "screen-space",
    "world-space",
};
 
partial interface XRSession {
  // Attributes
  readonly attribute XRInteractionMode interactionMode;
};
 
partial interface XRView {
  readonly attribute boolean isFirstPersonObserver;
};
</syntaxhighlight>
 
== External Links ==
* [https://www.w3.org/TR/webxr-ar-module-1/ Specification]
* [https://github.com/immersive-web/webxr-ar-module GitHub]
 
{{Navbox specifications}}
 
[[Category:Specifications]]

Latest revision as of 22:42, 28 February 2023

WebXR Augmented Reality Module
StatusCR
Last Updated2 November 2022
Editor(s)Brandon Jones, Manish Goregaokar, Rik Cabanier
Former Editor(s)Nell Waliczek
CG or WG?WG

The WebXR Augmented Reality Module expands the WebXR Device API with functionality specific to AR devices, such as defining blend modes for rendered pixels and interaction modes to accommodate different AR device form factors, i.e. phone screen vs. head-mounted.

WebIDL[edit]

enum XREnvironmentBlendMode {
  "opaque",
  "alpha-blend",
  "additive"
};

partial interface XRSession {
  // Attributes
  readonly attribute XREnvironmentBlendMode environmentBlendMode;
};

enum XRInteractionMode {
    "screen-space",
    "world-space",
};

partial interface XRSession {
  // Attributes
  readonly attribute XRInteractionMode interactionMode;
};

partial interface XRView {
  readonly attribute boolean isFirstPersonObserver;
};

External Links[edit]