v147 · WebXR · AR
WebXR Plane Detection API
Chrome 147 ships the WebXR Plane Detection API, letting AR web apps retrieve the set of real-world planes — floors, walls, tables — detected by the device. Unlike depth-based detection, plane detection surfaces semantic geometry that remains coherent even when objects occlude part of a surface.
concepts
-
Capability Inspector
Check whether this browser and device support WebXR plane detection. Shows how to query for the
plane-detectionoptional feature, inspect the resultingXRPlaneobjects, and read theirorientationandpolygonproperties. -
Plane Visualizer
A 2D simulation of a plane-detection AR session — see how the API surfaces horizontal and vertical planes as polygon meshes, how plane geometry updates frame-by-frame, and how to overlay content anchored to a detected surface.
-
Plane Polygon Inspector
Select a simulated detected plane and inspect the raw
XRPlane.polygonvertex data — aDOMPointReadOnly[]convex hull. Hover a vertex to highlight it in the overhead 2D view. Shows area, bounding box, and axis orientation for each plane shape. -
AR Surface Mapper
Top-down 2D map of a simulated room showing detected planes as coloured polygons. Click planes to inspect their
XRPlaneattributes, toggle a confidence heat map, and snap virtual AR objects to selected surfaces at clicked positions. -
Compatibility Lab
Probes all five WebXR plane detection globals —
XRPlane,XRPlaneSet,XRFrame.detectedPlanes,navigator.xrpresence, andimmersive-arsession support. RunsisSessionSupported()live and provides the graceful-degradation pattern for browsers without plane detection.
why it shipped
Augmented-reality web apps need to understand the physical world to place virtual content correctly — a virtual lamp should sit on a real table, a navigation overlay should align with a real floor. The existing WebXR Depth Sensing module exposes raw depth values, but those are noisy and fragmented when objects occlude a surface: the depth map shows the object, not the wall behind it. The Plane Detection API is complementary: when the device's tracking system recognises a plane (floor, wall, table-top, ceiling), it surfaces a clean polygon representing the surface boundary plus a semantic label — horizontal or vertical. Developers opt into this feature by requesting plane-detection in the optional features list when creating an immersive-ar session. Each animation frame then provides an updated XRPlaneSet through XRFrame.detectedPlanes, with each XRPlane carrying a pose, an orientation, and a bounding polygon in its own coordinate system.