📄 threejs/Addons/Webxr/XRPlanes

File: XRPlanes.md | Updated: 11/15/2025


title: XRPlanes category: Addons layout: docs

XRPlanes

A utility class for the WebXR Plane Detection Module. If planes are detected by WebXR, this class will automatically add them as thin box meshes to the scene when below code snippet is used.

Code Example

const planes = new XRPlanes( renderer );
scene.add( planes );

Import

XRPlanes is an addon, and must be imported explicitly, see Installation#Addons.

import { XRPlanes } from 'three/addons/webxr/XRPlanes.js';

Constructor

new XRPlanes( renderer : WebGLRenderer | WebGPURenderer )

Constructs a new XR plane container.

renderer | The renderer.
---|---

Source

examples/jsm/webxr/XRPlanes.js