WebXR world sensing (hit test, anchors, depth, planes, camera)
Lets an AR session see surfaces, depth and even raw camera frames of the room.
In one line
Can detect surfaces and depth in your room, and even see camera frames
Lets an AR session see surfaces, depth and even raw camera frames of the room.
Maps the person's real surroundings: floors, tables, walls, depth and, with camera access, pixels of the room.
What it can and can't do
What the user does: You tap View in AR and allow the AR and camera prompts.
It can
- Find floors, walls and tables, so items sit on them
- Place items that stay in one spot
- Measure depth, and with camera access, see raw camera frames
It cannot
- See raw camera frames unless you allow camera access
- Work without your allowing the AR prompt
- Keep running after you end the session
- Work in Safari, Firefox or on iPhone
How it differs between platforms: Chrome and Edge on Android support it. Safari and Firefox do not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 81 | 2020-04-07 | Hit test; depth 90; camera access 107; planes 147 |
| Edge | Supported | 81 | 2020-04-13 | Mirrors Chrome |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 81 | 2020-04-07 | Mirrors Chrome |
| Samsung Internet | Supported | 13.0 | 2020-12-02 | XRSystem 12; features partial |
How a site asks for it
| API | optionalFeatures: hit-test, anchors, depth-sensing, light-estimation, plane-detection, camera-access; frame.detectedPlanes, XRCamera |
| Permission name | xr-spatial-tracking |
| Permissions policy | xr-spatial-tracking |
| Browser compat keys | api.XRHitTestSourceapi.XRAnchorapi.XRDepthInformationapi.XRPlaneapi.XRCamera |
| How access is granted | prompt |
| What the user sees | Chrome shows AR permission; camera-access shows a dedicated camera prompt |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per session |
| How to take it back | End session |
| Inside an iframe | Needs allow="xr-spatial-tracking" (and camera for camera-access) |
Typical flow
- Request AR session with features
- Per frame query planes, depth and hit tests
- camera-access exposes WebGL texture of camera
Data you get
What comes back: Surface geometry, depth map, camera texture
Shape: stream
How often: per XR frame
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
hit result pose | object | meters | relative to ray | centimetre |
depth map | binary | millimeters | 0 to about 8 m | 16 bit per pixel, 160x90 typical |
detectedPlanes[].polygon | list | meters | convex polygon | orientation horizontal or vertical |
camera view | binary | pixels | device camera resolution | RGBA via WebGL texture |
Technical limits
- Mesh detection is not shipped
- Chrome Android and Quest only
- Not on iOS Safari
The story
What it is
In AR, a page can sense your floors, walls and even see your room.
For you
A page places a virtual chair on your floor and keeps it there as you walk. To do that it needs to see your room.
For makers
Makers can fit virtual things to real spaces, like furniture and measuring tools. It gives them room shape and sometimes camera pixels, so it is a privacy risk.
Where you see it
| Type | Example | Apps |
|---|---|---|
| shopping | You place a virtual sofa on your floor, sized to fit your room. | IKEA, Wayfair |
| games | An AR game puts creatures on your table and hides them behind your couch. | None named |
| utilities | A measuring page uses surfaces and depth to measure a table. | None named |
| education | A biology page lets you walk around a giant heart in your classroom. | None named |
| enterprise | A repair guide anchors arrows on a real machine. | None named |
| security | A bad page could map your home and sell the plan, or keep camera pictures of your room. | None named |
Risks
- Room scanning
- Camera pictures
What the platform says
- W3C: WebXR Device API. The Immersive Web group describes AR features like hit test and anchors that place things in the real world.
Good uses and abuse
Legitimate uses
- Furniture placement
- Measure apps
Known abuse
- Room scanning for burglary targeting
- Camera frames of private spaces
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 5 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2020-02, Chrome 81: Hit test
- 2020-09, Chrome 85: Anchors
- 2021-08, Chrome 90: Depth sensing and light estimation
- 2022-11, Chrome 107: Raw camera access
- 2025-07, Chrome 139: Depth sensing pause and resume
- 2026-02, Chrome 147: Plane detection and initiateRoomCapture
Related capabilities
Related
- WebXR immersive VR and AR sessions. Can start a full VR or AR session after you allow it
Sources
How well checked: Checked against real behavior.