summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/xr/xr_plane.idl
blob: a08445c8c8c4c5ba124e26bbc9b7df1db10bf131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

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

// More details about the plane detection API can be found here:
// https://github.com/immersive-web/real-world-geometry/blob/master/plane-detection-explainer.md
[
    SecureContext,
    Exposed=Window,
    RuntimeEnabled=WebXRIncubations
]
interface XRPlane {
    readonly attribute XRSpace planeSpace;
    readonly attribute FrozenArray<DOMPointReadOnly> polygon;
    readonly attribute XRPlaneOrientation? orientation;
    readonly attribute DOMHighResTimeStamp lastChangedTime;

    [CallWith=ScriptState, RaisesException, RuntimeEnabled=WebXRAnchors]
    Promise<XRAnchor> createAnchor(XRRigidTransform initial_pose);
};