Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWebXRHandTrackingOptions

Configuration interface for the hand tracking feature

Hierarchy

  • IWebXRHandTrackingOptions

Index

Properties

Optional handMeshesSearch playground for handMeshes

handMeshes: { customMeshes?: { left: AbstractMesh; right: AbstractMesh }; customRigMappings?: { left: XRHandMeshRigMapping; right: XRHandMeshRigMapping }; disableDefaultMeshes?: boolean; meshesUseLeftHandedCoordinates?: boolean }

Configuration object for the hand meshes.

Type declaration

  • 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.

Optional jointMeshesSearch playground for jointMeshes

jointMeshes: { enablePhysics?: boolean; invisible?: boolean; keepOriginalVisible?: boolean; onHandJointMeshGenerated?: (meshInstance: InstancedMesh, jointId: number, hand: XRHandedness) => AbstractMesh | undefined; physicsProps?: { friction?: number; impostorType?: number; restitution?: number }; scaleFactor?: number; sourceMesh?: Mesh }

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 onHandJointMeshGenerated?: (meshInstance: InstancedMesh, jointId: number, hand: XRHandedness) => AbstractMesh | undefined

    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.

    param

    An instance of the original joint mesh being used for the joint.

    param

    The joint's index, see https://immersive-web.github.io/webxr-hand-input/#skeleton-joints-section for more info.

    param

    Which hand ("left", "right") the joint will be on.

  • 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.

xrInputSearch playground for xrInput

xrInput: WebXRInput

The xrInput that will be used as source for new hands

Legend

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