WebXR Marker Tracking Module
Jump to navigation
Jump to search
Status | CG-REPORT |
---|---|
Last Updated | 2 July 2021 |
Editor(s) | Klaus Weidner |
CG or WG? | CG |
The WebXR Marker Tracking module expands the WebXR Device API with functionality to detect 2D images from a specified set and track their poses in the real world.
WebIDL
dictionary XRTrackedImageInit {
required ImageBitmap image;
required float widthInMeters;
};
partial dictionary XRSessionInit {
sequence<XRTrackedImageInit> trackedImages;
};
enum XRImageTrackability {
"untrackable",
"trackable",
};
partial interface XRSession {
Promise<FrozenArray<XRImageTrackability>> getImageTrackability();
};
enum XRImageTrackingState {
"untracked",
"tracked",
"emulated",
};
[SecureContext, Exposed=Window]
interface XRImageTrackingResult {
[SameObject] readonly attribute XRSpace imageSpace;
readonly attribute unsigned long index;
readonly attribute XRImageTrackingState trackingState;
readonly attribute float measuredWidthInMeters;
};
partial interface XRFrame {
FrozenArray<XRImageTrackingResult> getImageTrackingResults();
};