API Reference

Class List

XrHand

Represents a hand with fingers and joints.

Summary

Properties

fingers

List of fingers of a hand.

joints

List of joints of hand.

tips

List of joints that are tips of a fingers.

tracking

True if tracking is available, otherwise tracking might be lost.

wrist

Wrist of a hand, or null if it is not available by WebXR underlying system.

Methods

getJointById

Returns joint by XRHand id from list in specs: https://immersive-web.

Events

tracking

Fired when tracking becomes available.

trackinglost

Fired when tracking is lost.

Details

Constructor

XrHand(inputSource)

Represents a hand with fingers and joints.

Parameters

inputSourceXrInputSource

Input Source that hand is related to.

Properties

XrFinger[]fingers

List of fingers of a hand.

XrJoint[]joints

List of joints of hand.

XrJoint[]tips

List of joints that are tips of a fingers.

booleantracking

True if tracking is available, otherwise tracking might be lost.

XrJoint, nullwrist

Wrist of a hand, or null if it is not available by WebXR underlying system.

Methods

getJointById(id)

Returns joint by XRHand id from list in specs: https://immersive-web.github.io/webxr-hand-input/.

Parameters

idstring

Id of a joint based on specs ID's in XRHand: https://immersive-web.github.io/webxr-hand-input/.

Returns

XrJoint, null

Joint or null if not available.

Events

tracking

Fired when tracking becomes available.

trackinglost

Fired when tracking is lost.