| // Copyright 2020 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. |
| |
| // PRELIMINARY draft explainer, this is still in ongoing discussions |
| // with the immersive-web group and likely to change: |
| // |
| // https://github.com/klausw/webxr-image-tracking/blob/main/explainer.md |
| |
| enum XRImageTrackingState { |
| "tracked", |
| "emulated", |
| }; |
| |
| [ |
| RuntimeEnabled=WebXRImageTracking, |
| SecureContext, |
| Exposed=Window |
| ] |
| interface XRImageTrackingResult { |
| [SameObject] readonly attribute XRSpace imageSpace; |
| readonly attribute unsigned long index; |
| readonly attribute XRImageTrackingState trackingState; |
| readonly attribute float measuredWidthInMeters; |
| }; |