Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWebXRHandTrackingOptions

Configuration interface for the hand tracking feature

Hierarchy

  • IWebXRHandTrackingOptions

Index

Properties

Properties

Optional jointMeshesSearch playground for jointMeshes

jointMeshes: { disableDefaultHandMesh?: boolean; enablePhysics?: boolean; handMeshes?: { left: AbstractMesh; right: AbstractMesh }; invisible?: boolean; keepOriginalVisible?: boolean; onHandJointMeshGenerated?: (meshInstance: InstancedMesh, jointId: number, controllerId: string) => Mesh | undefined; physicsProps?: { friction?: number; impostorType?: number; restitution?: number }; rigMapping?: { left: string[]; right: string[] }; scaleFactor?: number; sourceMesh?: Mesh }

Configuration object for the joint meshes

Type declaration

  • Optional disableDefaultHandMesh?: boolean

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

  • Optional enablePhysics?: boolean

    Should each instance have its own physics impostor

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

    a rigged hand-mesh that will be updated according to the XRHand data provided. This will override the default hand mesh

  • 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, controllerId: string) => Mesh | 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

      • (meshInstance: InstancedMesh, jointId: number, controllerId: string): Mesh | undefined
      • Parameters

        • meshInstance: InstancedMesh
        • jointId: number
        • controllerId: string

        Returns Mesh | undefined

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

    If enabled, override default physics properties

    • Optional friction?: number
    • Optional impostorType?: number
    • Optional restitution?: number
  • Optional rigMapping?: { left: string[]; right: string[] }

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

    • left: string[]
    • right: string[]
  • Optional scaleFactor?: number

    Scale factor for all instances (defaults to 2)

  • Optional sourceMesh?: Mesh

    A source mesh to be used to create instances. Defaults to a sphere. 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