The read-only inputSource
property of the XRTransientInputHitTestResult
interface represents an XRInputSource
object that was used to compute the results
array.
Value
Examples
The inputSource
property allows you to filter hit test results by input source.
function onXRFrame(time, xrFrame) {
let hitTestResults = xrFrame.getHitTestResultsForTransientInput(
transientHitTestSource,
);
hitTestResults.forEach((resultsPerInputSource) => {
if (resultsPerInputSource.inputSource === myPreferredInputSource) {
}
});
}
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
inputSource |
81 |
81 |
No |
No |
68 |
No |
No |
81 |
No |
58 |
No |
13.0 |
See also