v147 · Plane Polygon Inspector

Plane Polygon Inspector

Every detected XRPlane exposes a polygon array of DOMPointReadOnly vertices that define the plane's convex boundary. Select a simulated detected plane to inspect its vertex data and see the polygon rendered in 2D overhead view.

XRPlane.polygon provides the convex hull vertices of the detected surface in the plane's local coordinate space. Chrome 147 exposes this API via the plane-detection optional feature in requestSession(). This demo simulates realistic polygon data for common room surfaces.
XRPlane.polygon — overhead view
Vertex data — DOMPointReadOnly[]
# x (m) y (m) z (m) w

see also