Class WebXRTrackedSources
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRTrackedSources
Constructors
constructor
-
Creates a WebXR tracked sources feature.
Parameters
- _xrSessionManager: WebXRSessionManager
The WebXR session manager.
Returns WebXRTrackedSources
- _xrSessionManager: WebXRSessionManager
Properties
Optionaldepends On
The dependencies of this feature, if any
disable Auto Attach
Should auto-attach be disabled?
is Disposed
Is this feature disposed?
on Feature Attach Observable
Observers registered here will be executed when the feature is attached
on Feature Detach Observable
Observers registered here will be executed when the feature is detached
Readonlyon Tracked Source Added Observable
Notifies observers when a source enters the feature's current tracked source set.
Readonlyon Tracked Source Removed Observable
Notifies observers when a source leaves the feature's current tracked source set, including on detach.
Static ReadonlyName
The module's name.
Static ReadonlyVersion
The Babylon version of this module.
This number does not correspond to the WebXR specification version.
Accessors
attached
-
get attached(): boolean
Is this feature attached
Returns boolean
tracked Sources
-
get trackedSources(): readonly XRInputSource[]
Gets a copy of the sources currently reported by
XRSession.trackedSources.These sources are not added to
XRSession.inputSourcesor Babylon's controller collection.Returns readonly XRInputSource[]
xr Native Feature Name
-
get xrNativeFeatureName(): string
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Returns string
-
set xrNativeFeatureName(name: string): void
The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
Parameters
- name: string
Returns void
Methods
attach
-
Attaches the feature to the active XR session.
Parameters
Optionalforce: booleanWhether to reattach when the feature is already attached.
Returns boolean
truewhen attachment succeeds; otherwisefalse.
detach
-
Detaches the feature and clears its tracked source state.
Returns boolean
truewhen detachment succeeds; otherwisefalse.
dispose
-
Disposes the feature and clears its observables.
Returns void
is Compatible
-
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
Exposes input sources that the XR runtime continues tracking while they are not active input sources.
Tracked sources are intentionally kept separate from
XRSession.inputSourcesand Babylon's normal WebXR input/controller pipeline.See