Skip to content

Commit

Permalink
Add XrJoint#id
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Nov 22, 2024
1 parent a4b9c1c commit ba65e4a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/framework/xr/xr-joint.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class XrJoint {
_index;

/**
* @type {string}
* @type {XRHandJoint}
* @private
*/
_id;
Expand All @@ -47,7 +47,7 @@ class XrJoint {
_hand;

/**
* @type {XrFinger}
* @type {XrFinger|null}
* @private
*/
_finger;
Expand All @@ -65,7 +65,7 @@ class XrJoint {
_tip;

/**
* @type {number}
* @type {number|null}
* @private
*/
_radius = null;
Expand Down Expand Up @@ -116,7 +116,7 @@ class XrJoint {
* Create an XrJoint instance.
*
* @param {number} index - Index of a joint within a finger.
* @param {string} id - Id of a joint based on WebXR Hand Input Specs.
* @param {XRHandJoint} id - Id of a joint based on WebXR Hand Input Specs.
* @param {XrHand} hand - Hand that joint relates to.
* @param {XrFinger|null} finger - Finger that joint is related to. Can be null in the case of
* the wrist joint.
Expand Down Expand Up @@ -181,6 +181,15 @@ class XrJoint {
return this._rotation;
}

/**
* Id of a joint based on WebXR Hand Input Specs.
*
* @type {XRHandJoint}
*/
get id() {
return this._id;
}

/**
* Index of a joint within a finger, starting from 0 (root of a finger) all the way to tip of
* the finger.
Expand Down

0 comments on commit ba65e4a

Please sign in to comment.