WebXR Plane Detection Module

From WebXR Wiki
Jump to navigation Jump to search
WebXR Plane Detection Module
StatusCG-REPORT
Last Updated29 June 2021
Editor(s)Piotr Bialecki
CG or WG?CG

The WebXR Plane Detection module expands the WebXR Device API to enable detecting horizontal and vertical planes within an environment in an immersive-ar session.

WebIDL[edit]

enum XRPlaneOrientation {
    "horizontal",
    "vertical"
};

interface XRPlane {
    [SameObject] readonly attribute XRSpace planeSpace;

    readonly attribute FrozenArray<DOMPointReadOnly> polygon;
    readonly attribute XRPlaneOrientation? orientation;
    readonly attribute DOMHighResTimeStamp lastChangedTime;
};

interface XRPlaneSet {
  readonly setlike<XRPlane>;
};

partial interface XRFrame {
  readonly attribute XRPlaneSet detectedPlanes;
};

partial interface XRSession {
  Promise<undefined> initiateRoomCapture();
};

External Links[edit]