Class WebXRControllerPointerSelection
Hierarchy
- WebXRAbstractFeature
- WebXRControllerPointerSelection
Index
Constructors
Properties
- disable
Auto Attach - disable
Pointer Lighting - disable
Selection Mesh Lighting - display
Laser Pointer - display
Selection Mesh - is
Disposed - laser
Pointer Default Color - laser
Pointer Picked Color - on
Feature Attach Observable - on
Feature Detach Observable - ray
Selection Predicate - selection
Mesh Default Color - selection
Mesh Picked Color - xr
Native Feature Name - Name
- Version
Accessors
Methods
Constructors
constructor
constructs a new background remover module
Parameters
_xrSessionManager: WebXRSessionManager
the session manager for this module
_options: IWebXRControllerPointerSelectionOptions
read-only options to be used in this module
Returns WebXRControllerPointerSelection
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
disable Pointer LightingSearch playground for disablePointerLighting
Disable lighting on the laser pointer (so it will always be visible)
disable Selection Mesh LightingSearch playground for disableSelectionMeshLighting
Disable lighting on the selection mesh (so it will always be visible)
display Laser PointerSearch playground for displayLaserPointer
Should the laser pointer be displayed
display Selection MeshSearch playground for displaySelectionMesh
Should the selection mesh be displayed (The ring at the end of the laser pointer)
is DisposedSearch playground for isDisposed
Is this feature disposed?
laser Pointer Default ColorSearch playground for laserPointerDefaultColor
Default color of the laser pointer
laser Pointer Picked ColorSearch playground for laserPointerPickedColor
This color will be set to the laser pointer when selection is triggered
on Feature Attach ObservableSearch playground for onFeatureAttachObservable
Observers registered here will be executed when the feature is attached
on Feature Detach ObservableSearch playground for onFeatureDetachObservable
Observers registered here will be executed when the feature is detached
ray Selection PredicateSearch playground for raySelectionPredicate
Type declaration
Optional filter to be used for ray selection. This predicate shares behavior with scene.pointerMovePredicate which takes priority if it is also assigned.
Parameters
mesh: AbstractMesh
Returns boolean
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
A module that will enable pointer selection for motion controllers of XR Input Sources