Class WebXRHitTestLegacy
Hierarchy
- WebXRAbstractFeature
- WebXRHitTestLegacy
Implements
Index
Constructors
constructor
Creates a new instance of the (legacy version) hit test feature
Parameters
_xrSessionManager: WebXRSessionManager
an instance of WebXRSessionManager
Optional options: IWebXRLegacyHitTestOptions
options to use when constructing this feature
Returns WebXRHitTestLegacy
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
last NativeXRHit ResultsSearch playground for lastNativeXRHitResults
Populated with the last native XR Hit Results
on Hit Test Result ObservableSearch playground for onHitTestResultObservable
Triggered when new babylon (transformed) hit test results are available
Readonly optionsSearch playground for options
options to use when constructing this feature
xr Native Feature NameSearch playground for xrNativeFeatureName
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Static Readonly NameSearch playground for Name
The module's name
Static Readonly VersionSearch playground for Version
The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the WebXR specs version
Accessors
attached
Is this feature attached
Returns boolean
Methods
attachSearch playground for attach
attach this feature Will usually be called by the features manager
Returns boolean
true if successful.
detachSearch playground for detach
detach this feature. Will usually be called by the features manager
Returns boolean
true if successful.
disposeSearch playground for dispose
Dispose this feature and all of the resources attached
Returns void
is CompatibleSearch playground for isCompatible
This function will be executed during before enabling the feature and can be used to not-allow enabling it. Note that at this point the session has NOT started, so this is purely checking if the browser supports it
Returns boolean
whether or not the feature is compatible in this environment
Static XRHit Test With RaySearch playground for XRHitTestWithRay
execute a hit test with an XR Ray
Parameters
xrSession: XRSession
a native xrSession that will execute this hit test
xrRay: XRRay
the ray (position and direction) to use for ray-casting
referenceSpace: XRReferenceSpace
native XR reference space to use for the hit-test
Optional filter: ((result: XRHitResult) => boolean)
filter function that will filter the results
Parameters
result: XRHitResult
Returns boolean
Returns Promise<XRHitResult[]>
a promise that resolves with an array of native XR hit result in xr coordinates system
Static XRHit Test With Select EventSearch playground for XRHitTestWithSelectEvent
Execute a hit test on the current running session using a select event returned from a transient input (such as touch)
Parameters
event: XRInputSourceEvent
the (select) event to use to select with
referenceSpace: XRReferenceSpace
the reference space to use for this hit test
Returns Promise<XRHitResult[]>
a promise that resolves with an array of native XR hit result in xr coordinates system
The currently-working hit-test module. Hit test (or Ray-casting) is used to interact with the real world. For further information read here - https://github.com/immersive-web/hit-test