Interface IWebXRHandTrackingOptions
Hierarchy
- IWebXRHandTrackingOptions
Index
Properties
Properties
Optional hand MeshesSearch playground for handMeshes
Configuration object for the hand meshes.
Type declaration
Optional custom
Colors?: { base?: Color3; fingerColor?: Color3; fresnel?: Color3; tipFresnel?: Color3 } Override the colors of the hand meshes.
Optional custom
Meshes?: { left: AbstractMesh; right: AbstractMesh } Rigged hand meshes that will be tracked to the user's hands. This will override the default hand mesh.
left: AbstractMesh
right: AbstractMesh
Optional custom
Rig Mappings?: { 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
left: XRHandMeshRigMapping
right: XRHandMeshRigMapping
Optional disable
Default Meshes?: boolean Should the default hand mesh be disabled. In this case, the spheres will be visible (unless set invisible).
Optional meshes
Use Left Handed Coordinates?: boolean Are the meshes prepared for a left-handed system. Default hand meshes are right-handed.
Optional joint MeshesSearch playground for jointMeshes
Configuration object for the joint meshes.
Type declaration
Optional enable
Physics?: boolean Should each instance have its own physics impostor
Optional invisible?: boolean
Should the meshes created be invisible (defaults to false).
Optional keep
Original Visible?: boolean Should the source mesh stay visible (defaults to false).
Optional physics
Props?: { friction?: number; impostorType?: number; restitution?: number } If enabled, override default physics properties
Optional friction?: number
Optional impostor
Type?: number Optional restitution?: number
Optional scale
Factor?: number Scale factor for all joint meshes (defaults to 1)
Optional source
Mesh?: 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.
on
Hand Joint Mesh Generated?: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
meshInstance: InstancedMesh
An instance of the original joint mesh being used for the joint.
jointId: number
The joint's index, see https://immersive-web.github.io/webxr-hand-input/#skeleton-joints-section for more info.
hand: XRHandedness
Which hand ("left", "right") the joint will be on.
Returns undefined | AbstractMesh
xr InputSearch playground for xrInput
The xrInput that will be used as source for new hands
Configuration interface for the hand tracking feature