Skip to Content
Platform.Ontology

WebXR world sensing (hit test, anchors, depth, planes, camera)

Lets an AR session see surfaces, depth and even raw camera frames of the room.

Asks you firstHardware and accessoriesXRWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported812020-04-07Hit test; depth 90; camera access 107; planes 147
EdgeSupported812020-04-13Mirrors Chrome
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported812020-04-07Mirrors Chrome
Samsung InternetSupported13.02020-12-02XRSystem 12; features partial

How a site asks for it

APIoptionalFeatures: hit-test, anchors, depth-sensing, light-estimation, plane-detection, camera-access; frame.detectedPlanes, XRCamera
Permission namexr-spatial-tracking
Permissions policyxr-spatial-tracking
Browser compat keysapi.XRHitTestSource
api.XRAnchor
api.XRDepthInformation
api.XRPlane
api.XRCamera
How access is grantedprompt
What the user seesChrome shows AR permission; camera-access shows a dedicated camera prompt
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsPer session
How to take it backEnd session
Inside an iframeNeeds allow="xr-spatial-tracking" (and camera for camera-access)

Typical flow

  1. Request AR session with features
  2. Per frame query planes, depth and hit tests
  3. 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

FieldTypeUnitRangePrecision
hit result poseobjectmetersrelative to raycentimetre
depth mapbinarymillimeters0 to about 8 m16 bit per pixel, 160x90 typical
detectedPlanes[].polygonlistmetersconvex polygonorientation horizontal or vertical
camera viewbinarypixelsdevice camera resolutionRGBA 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

TypeExampleApps
shoppingYou place a virtual sofa on your floor, sized to fit your room.IKEA, Wayfair
gamesAn AR game puts creatures on your table and hides them behind your couch.None named
utilitiesA measuring page uses surfaces and depth to measure a table.None named
educationA biology page lets you walk around a giant heart in your classroom.None named
enterpriseA repair guide anchors arrows on a real machine.None named
securityA 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

ScoreValueMeaning
Sensitivity5 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough 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

Sources

How well checked: Checked against real behavior.

On this page