Options
All
  • Public
  • Public/Protected
  • All
Menu

Configuration interface for the hand tracking feature

Hierarchy

  • IWebXRHandTrackingOptions

Index

Properties

handMeshes?: { customColors?: { base?: Color3; fingerColor?: Color3; fresnel?: Color3; tipFresnel?: Color3 }; customMeshes?: { left: AbstractMesh; right: AbstractMesh }; customRigMappings?: { left: XRHandMeshRigMapping; right: XRHandMeshRigMapping }; disableDefaultMeshes?: boolean; meshesUseLeftHandedCoordinates?: boolean }

Configuration object for the hand meshes.

Type declaration

  • Optional customColors?: { base?: Color3; fingerColor?: Color3; fresnel?: Color3; tipFresnel?: Color3 }

    Override the colors of the hand meshes.

  • Optional customMeshes?: { left: AbstractMesh; right: AbstractMesh }

    Rigged hand meshes that will be tracked to the user's hands. This will override the default hand mesh.

  • Optional customRigMappings?: { left: XRHandMeshRigMapping; right: XRHandMeshRigMapping }

    If a hand mesh was provided, this array will define what axis will update which node. This will override the default hand mesh

  • Optional disableDefaultMeshes?: boolean

    Should the default hand mesh be disabled. In this case, the spheres will be visible (unless set invisible).

  • Optional meshesUseLeftHandedCoordinates?: boolean

    Are the meshes prepared for a left-handed system. Default hand meshes are right-handed.

jointMeshes?: { enablePhysics?: boolean; invisible?: boolean; keepOriginalVisible?: boolean; physicsProps?: { friction?: number; impostorType?: number; restitution?: number }; scaleFactor?: number; sourceMesh?: Mesh; onHandJointMeshGenerated?: any }

Configuration object for the joint meshes.

Type declaration

  • Optional enablePhysics?: boolean

    Should each instance have its own physics impostor

  • Optional invisible?: boolean

    Should the meshes created be invisible (defaults to false).

  • Optional keepOriginalVisible?: boolean

    Should the source mesh stay visible (defaults to false).

  • Optional physicsProps?: { friction?: number; impostorType?: number; restitution?: number }

    If enabled, override default physics properties

    • Optional friction?: number
    • Optional impostorType?: number
    • Optional restitution?: number
  • Optional scaleFactor?: number

    Scale factor for all joint meshes (defaults to 1)

  • Optional sourceMesh?: Mesh

    A source mesh to be used to create instances. Defaults to an icosphere with two subdivisions and smooth lighting. This mesh will be the source for all other (25) meshes. It should have the general size of a single unit, as the instances will be scaled according to the provided radius.

  • onHandJointMeshGenerated?:function
    • This function will be called after a mesh was created for a specific joint. Using this function you can either manipulate the instance or return a new mesh. When returning a new mesh the instance created before will be disposed.

      Parameters

      Returns undefined | AbstractMesh

xrInput: WebXRInput

The xrInput that will be used as source for new hands

Legend

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

Settings

Theme