Options
All
  • Public
  • Public/Protected
  • All
Menu

A module that will enable pointer selection for motion controllers of XR Input Sources

Hierarchy

Index

Constructors

Properties

disableAutoAttach: boolean

Should auto-attach be disabled?

disablePointerLighting: boolean

Disable lighting on the laser pointer (so it will always be visible)

disableSelectionMeshLighting: boolean

Disable lighting on the selection mesh (so it will always be visible)

displayLaserPointer: boolean

Should the laser pointer be displayed

displaySelectionMesh: boolean

Should the selection mesh be displayed (The ring at the end of the laser pointer)

isDisposed: boolean

Is this feature disposed?

laserPointerDefaultColor: Color3

Default color of the laser pointer

laserPointerPickedColor: Color3

This color will be set to the laser pointer when selection is triggered

raySelectionPredicate: ((mesh: AbstractMesh) => boolean)

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

      Returns boolean

selectionMeshDefaultColor: Color3

default color of the selection ring

selectionMeshPickedColor: Color3

This color will be applied to the selection ring when selection is triggered

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Name: "xr-controller-pointer-selection" = "xr-controller-pointer-selection"

The module's name

Version: 1 = 1

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

  • get attached(): boolean
  • Is this feature attached

    Returns boolean

Methods

  • attach(): boolean
  • attach this feature Will usually be called by the features manager

    Returns boolean

    true if successful.

  • detach(): boolean
  • detach this feature. Will usually be called by the features manager

    Returns boolean

    true if successful.

  • dispose(): void
  • Dispose this feature and all of the resources attached

    Returns void

  • 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

  • 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

  • isCompatible(): boolean
  • 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

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme