Skip to content

Commit db4671e

Browse files
authored
Add XrJoint#id (#7132)
1 parent 1003d28 commit db4671e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/framework/xr/xr-joint.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class XrJoint {
3535
_index;
3636

3737
/**
38-
* @type {string}
38+
* @type {XRHandJoint}
3939
* @private
4040
*/
4141
_id;
@@ -47,7 +47,7 @@ class XrJoint {
4747
_hand;
4848

4949
/**
50-
* @type {XrFinger}
50+
* @type {XrFinger|null}
5151
* @private
5252
*/
5353
_finger;
@@ -65,7 +65,7 @@ class XrJoint {
6565
_tip;
6666

6767
/**
68-
* @type {number}
68+
* @type {number|null}
6969
* @private
7070
*/
7171
_radius = null;
@@ -116,7 +116,7 @@ class XrJoint {
116116
* Create an XrJoint instance.
117117
*
118118
* @param {number} index - Index of a joint within a finger.
119-
* @param {string} id - Id of a joint based on WebXR Hand Input Specs.
119+
* @param {XRHandJoint} id - Id of a joint based on WebXR Hand Input Specs.
120120
* @param {XrHand} hand - Hand that joint relates to.
121121
* @param {XrFinger|null} finger - Finger that joint is related to. Can be null in the case of
122122
* the wrist joint.
@@ -181,6 +181,15 @@ class XrJoint {
181181
return this._rotation;
182182
}
183183

184+
/**
185+
* Id of a joint based on WebXR Hand Input Specs.
186+
*
187+
* @type {XRHandJoint}
188+
*/
189+
get id() {
190+
return this._id;
191+
}
192+
184193
/**
185194
* Index of a joint within a finger, starting from 0 (root of a finger) all the way to tip of
186195
* the finger.

0 commit comments

Comments
 (0)