XrPlaneDetection
Plane Detection provides the ability to detect real world surfaces based on estimations of the underlying AR system.
// start session with plane detection enabled
app.xr.start(camera, pc.XRTYPE_VR, pc.XRSPACE_LOCALFLOOR, {
planeDetection: true
});
app.xr.planeDetection.on('add', function (plane) {
// new plane been added
});
Summary
Properties
available | True if Plane Detection is available. |
planes | Array of XrPlane instances that contain individual plane information, or null if plane detection is not available. |
supported | True if Plane Detection is supported. |
Events
add | Fired when new XrPlane is added to the list. |
available | Fired when plane detection becomes available. |
remove | Fired when a XrPlane is removed from the list. |
unavailable | Fired when plane detection becomes unavailable. |
Details
Properties
True if Plane Detection is available. This property can be set to true only during a running session.
Array of XrPlane instances that contain individual plane information, or null if plane detection is not available.
Events
add
Fired when new XrPlane is added to the list.
app.xr.planeDetection.on('add', function (plane) {
// new plane is added
});
Parameters
plane | XrPlane | Plane that has been added. |
available
Fired when plane detection becomes available.