import { ReactNode } from 'react'; import { Matrix4Tuple } from 'three'; import { VuerProps } from '../../../vuer/interfaces'; export declare const HAND_JOINT_KEYS: XRHandJoint[]; export type HandStateType = { pinch: boolean; squeeze: boolean; tap: boolean; pinchValue: number; squeezeValue: number; tapValue: number; }; export type BothHandsState = { left?: HandStateType; leftLandmarks?: Record; right?: HandStateType; rightLandmarks?: Record; }; export declare const handState: BothHandsState; export declare function getLandmark(xrFrame: XRFrame, hand: XRHand, landmark: XRHandJoint, refSpace: XRReferenceSpace): Float32Array | null; /** * Hand tracking component props * * @dial xr */ export type HandsProps = VuerProps<{ /** * Frames per second for hand tracking updates * @dial performance * @dial-dtype int * @dial-default 30 * @dial-min 1 * @dial-max 60 * @dial-step 1 */ fps?: number; /** * Disable left hand tracking * @dial controls * @dial-dtype boolean * @dial-default false */ disableLeft?: boolean; /** * Disable right hand tracking * @dial controls * @dial-dtype boolean * @dial-default false */ disableRight?: boolean; /** * Hide left hand visualization * @dial visibility * @dial-dtype boolean * @dial-default false */ hideLeft?: boolean; /** * Hide right hand visualization * @dial visibility * @dial-dtype boolean * @dial-default false */ hideRight?: boolean; /** * Show coordinate frame markers on hands * @dial visualization * @dial-dtype boolean * @dial-default true */ showFrame?: boolean; /** * Scale of the coordinate frame markers * @dial visualization * @dial-dtype number * @dial-default 0.02 * @dial-min 0.001 * @dial-max 5 * @dial-step 0.001 */ frameScale?: number; /** * Stream hand data continuously * @dial performance * @dial-dtype boolean * @dial-default false */ stream?: boolean; /** * Overall scale factor for hand tracking * @dial transform * @dial-dtype number * @dial-default 1.0 * @dial-min 0.1 * @dial-max 10 * @dial-step 0.001 */ scale?: number; }>; /** * Left and right pose are relative to the wrist transformations. **/ export type HandsData = { left?: number[]; right?: number[]; leftState?: Omit; rightState?: Omit; }; /** * Hands component * * @dial xr/hands * @dial-name Hand Tracking * @dial-description XR hand tracking component for capturing and streaming hand poses and gestures * @dial-category XR * * This component is an event listener for the hands. This is separate from the * hands component in the @react-three/xr package. This component is used to send * messages to the server when the hands are moved or when the hands are used to * interact with the scene. * * @param {string} _key - the key for the component, set to hands by default on the python side. * @param {boolean} disableLeft - if true suppresses the left hand in events. * @param {boolean} disableRight - If true suppresses the right hand in events. * @param {boolean} hideLeft - if true hides the left hand. * @param {boolean} hideRight - if true hides the right hand. * @param {boolean} showFrame - if true shows the frame of the hand. * @param {number} frameScale - the scale of the frame. * @param {boolean} stream - whether to stream the hand data to the server. Off by default. * @param {number} fps - the frames per second for the hand data. * @param {number} scale - the scale of the hand data. * @param {ReactNode} children - the children of the component. * @param {VuerProps} _ - the rest of the props. * **/ export declare function Hands({ _key, children, fps, disableLeft, disableRight, hideLeft, hideRight, showFrame, frameScale, stream, scale, ..._ }: HandsProps): ReactNode;