import type { Object3D, XRGamepad, XRHandedness, XRInputSource } from 'three'; interface GamepadIndices { button: number; xAxis?: number; yAxis?: number; } declare type ComponentState = 'default' | 'touched' | 'pressed'; declare type ComponentProperty = 'button' | 'xAxis' | 'yAxis' | 'state'; declare type ValueNodeProperty = 'transform' | 'visibility'; declare type ComponentType = 'trigger' | 'squeeze' | 'touchpad' | 'thumbstick' | 'button'; interface VisualResponseDescription { componentProperty: ComponentProperty; states: ComponentState[]; valueNodeProperty: ValueNodeProperty; valueNodeName: string; minNodeName?: string; maxNodeName?: string; } declare type VisualResponses = Record; interface ComponentDescription { type: ComponentType; gamepadIndices: GamepadIndices; rootNodeName: string; visualResponses: VisualResponses; touchPointNodeName?: string; } interface Components { [componentKey: string]: ComponentDescription; } interface LayoutDescription { selectComponentId: string; components: Components; gamepadMapping: string; rootNodeName: string; assetPath: string; } declare type Layouts = Partial>; export interface Profile { profileId: string; fallbackProfileIds: string[]; layouts: Layouts; } interface ProfilesList { [profileId: string]: { path: string; deprecated?: boolean; } | undefined; } declare const MotionControllerConstants: { Handedness: Readonly<{ readonly NONE: "none"; readonly LEFT: "left"; readonly RIGHT: "right"; }>; ComponentState: Readonly<{ readonly DEFAULT: "default"; readonly TOUCHED: "touched"; readonly PRESSED: "pressed"; }>; ComponentProperty: Readonly<{ readonly BUTTON: "button"; readonly X_AXIS: "xAxis"; readonly Y_AXIS: "yAxis"; readonly STATE: "state"; }>; ComponentType: Readonly<{ readonly TRIGGER: "trigger"; readonly SQUEEZE: "squeeze"; readonly TOUCHPAD: "touchpad"; readonly THUMBSTICK: "thumbstick"; readonly BUTTON: "button"; }>; ButtonTouchThreshold: number; AxisTouchThreshold: number; VisualResponseProperty: Readonly<{ readonly TRANSFORM: "transform"; readonly VISIBILITY: "visibility"; }>; }; declare function fetchProfilesList(basePath: string): Promise; declare function fetchProfile(xrInputSource: XRInputSource, basePath: string, defaultProfile?: string | null, getAssetPath?: boolean): Promise<{ profile: Profile; assetPath: string | undefined; }>; interface ComponentValues { button: number | undefined; state: ComponentState; xAxis: number | undefined; yAxis: number | undefined; } declare class VisualResponse implements VisualResponseDescription { value: number | boolean; componentProperty: ComponentProperty; states: ComponentState[]; valueNodeName: string; valueNodeProperty: ValueNodeProperty; minNodeName?: string; maxNodeName?: string; valueNode: Object3D | undefined; minNode: Object3D | undefined; maxNode: Object3D | undefined; constructor(visualResponseDescription: VisualResponseDescription); updateFromComponent({ xAxis, yAxis, button, state }: ComponentValues): void; } declare class Component implements ComponentDescription { id: string; values: ComponentValues; type: ComponentType; gamepadIndices: GamepadIndices; rootNodeName: string; visualResponses: Record; touchPointNodeName?: string | undefined; touchPointNode?: Object3D; constructor(componentId: string, componentDescription: ComponentDescription); get data(): { id: Component['id']; } & Component['values']; updateFromGamepad(gamepad: XRGamepad): void; } declare class MotionController { xrInputSource: XRInputSource; assetUrl: string; layoutDescription: LayoutDescription; id: string; components: Record; constructor(xrInputSource: XRInputSource, profile: Profile, assetUrl: string); get gripSpace(): XRInputSource['gripSpace']; get targetRaySpace(): XRInputSource['targetRaySpace']; get data(): Array; updateFromGamepad(): void; } export { MotionControllerConstants, MotionController, fetchProfile, fetchProfilesList };