XR · class
HandSkeleton
One hand's joints, allocated once and written into every frame.
Explained in XR.
class HandSkeletonimport { HandSkeleton } from '@driftengine/xr';In depth
Sixteen floats a joint because a joint carries a full transform: a fingertip has an orientation as well as a position, and a consumer drawing a mesh needs both.
Properties
| Name | Type | Description |
|---|---|---|
matricesreadonly | Float32Array<ArrayBuffer> | Row-major transforms, JOINT_COUNT * 16, in world space. |
radiireadonly | Float32Array<ArrayBuffer> | Joint radii in metres, or 0 where the runtime offered none. |
trackedreadonly | Uint8Array<ArrayBuffer> | Whether each joint had a pose in the last frame that was read. |
trackedCount | number | How many joints were tracked in that frame. Zero means the hand is not visible. |
Accessors
| Name | Type | Description |
|---|---|---|
visibleget | boolean | Whether anything at all was seen, which is what a consumer branches on before drawing. |
Methods
clear
clear(): voidForget everything, which is what a source going away means.
More
Separate from a frame where every joint is merely untracked: a hand that has left has no last known pose worth holding, and a consumer that fades on loss needs the two told apart.