Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The XRHitTestSource
interface of the WebXR Device API handles hit test subscriptions. You can get an XRHitTestSource
object by using the XRSession.requestHitTestSource()
method.
This object doesn't itself contain hit test results, but it is used to compute hit tests for each XRFrame
by calling XRFrame.getHitTestResults()
, which returns XRHitTestResult
objects.