Class WebXRNearInteraction
Hierarchy
- WebXRAbstractFeature
- WebXRNearInteraction
Index
Constructors
constructor
constructs a new background remover module
Parameters
_xrSessionManager: WebXRSessionManager
the session manager for this module
_options: IWebXRNearInteractionOptions
read-only options to be used in this module
Returns WebXRNearInteraction
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
selection Mesh Default ColorSearch playground for selectionMeshDefaultColor
default color of the selection ring
selection Mesh Picked ColorSearch playground for selectionMeshPickedColor
This color will be applied to the selection ring when selection is triggered
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
get Mesh Under PointerSearch playground for getMeshUnderPointer
Will get the mesh under a specific pointer.
scene.meshUnderPointer
will only return one mesh - either left or right.Parameters
controllerId: string
the controllerId to check
Returns Nullable<AbstractMesh>
The mesh under pointer or null if no mesh is under the pointer
getXRController By Pointer IdSearch playground for getXRControllerByPointerId
Get the xr controller that correlates to the pointer id in the pointer event
Parameters
id: number
the pointer id to search for
Returns Nullable<WebXRInputSource>
the controller that correlates to this id or null if not found
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
set Far Interaction FeatureSearch playground for setFarInteractionFeature
This function sets webXRControllerPointerSelection feature that will be disabled when the hover range is reached for a mesh and will be reattached when not in hover range. This is used to remove the selection rays when moving.
Parameters
farInteractionFeature: Nullable<WebXRControllerPointerSelection>
the feature to disable when finger is in hover range for a mesh
Returns void
Static Pick Mesh With SphereSearch playground for PickMeshWithSphere
Picks a mesh with a sphere
Parameters
mesh: AbstractMesh
the mesh to pick
sphere: BoundingSphere
picking sphere in world coordinates
Optional skipBoundingInfo: boolean
a boolean indicating if we should skip the bounding info check
Returns PickingInfo
the picking info
A module that will enable near interaction near interaction for hands and motion controllers of XR Input Sources