1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

WebXR: Add support for hand tracking

This commit is contained in:
David Snopek
2024-02-15 14:58:38 -06:00
parent 2fe8f07b6c
commit 7fa8ccd1ed
8 changed files with 182 additions and 26 deletions

View File

@@ -229,13 +229,27 @@ XRFrame.prototype.session;
XRFrame.prototype.getViewerPose = function (referenceSpace) {};
/**
*
* @param {XRSpace} space
* @param {XRSpace} baseSpace
* @return {XRPose}
*/
XRFrame.prototype.getPose = function (space, baseSpace) {};
/**
* @param {Array<XRSpace>} spaces
* @param {XRSpace} baseSpace
* @param {Float32Array} transforms
* @return {boolean}
*/
XRFrame.prototype.fillPoses = function (spaces, baseSpace, transforms) {};
/**
* @param {Array<XRJointSpace>} jointSpaces
* @param {Float32Array} radii
* @return {boolean}
*/
XRFrame.prototype.fillJointRadii = function (jointSpaces, radii) {};
/**
* @constructor
*/
@@ -498,11 +512,51 @@ XRInputSource.prototype.targetRayMode;
*/
XRInputSource.prototype.targetRaySpace;
/**
* @type {?XRHand}
*/
XRInputSource.prototype.hand;
/**
* @constructor
*/
function XRHand() {};
/**
* Note: In fact, XRHand acts like a Map<string, XRJointSpace>, but I don't know
* how to represent that here. So, we're just giving the one method we call.
*
* @return {Array<XRJointSpace>}
*/
XRHand.prototype.values = function () {};
/**
* @type {number}
*/
XRHand.prototype.size;
/**
* @param {string} key
* @return {XRJointSpace}
*/
XRHand.prototype.get = function (key) {};
/**
* @constructor
*/
function XRSpace() {};
/**
* @constructor
* @extends {XRSpace}
*/
function XRJointSpace() {};
/**
* @type {string}
*/
XRJointSpace.prototype.jointName;
/**
* @constructor
*/