import type { VirtualAxisSample, VirtualJoystickConfig } from './input-snapshot'; /** * Per-joystick binding state. The backend closure owns a * Map keyed by joystick config name. */ export interface BindState { /** bound pointerId, or undefined if unbound */ pointerId?: number | undefined; /** origin in canvas pixels (anchor for fixed, first-touch for floating) */ originX: number; originY: number; } /** * Derive one frame of virtual axis outputs from live pointer state and * per-joystick binding state. * * Pure function: no DOM access. The backend closure is the SSOT for * per-joystick state; binding + origin selection happens in * browser-backend.ts onPointerDown. This function only reads bindState * and computes per-frame vectors. * * Unbound joysticks always produce the zero vector. * * @param configs - configured virtual joysticks * @param pointerMap - live pointer positions keyed by pointerId * @param bindState - per-joystick binding state (read-only) * @returns one VirtualAxisSample per configured joystick */ export declare function deriveVirtualAxes(configs: readonly VirtualJoystickConfig[], pointerMap: Map, bindState: Map): VirtualAxisSample[]; /** * Unbind a joystick when its bound pointer goes up or is cancelled. * Sets pointerId to undefined; the next deriveVirtualAxes call will * produce a zero vector for the unbound joystick. */ export declare function handleVirtualJoystickUnbind(bindState: Map, pointerId: number): void; //# sourceMappingURL=virtual-joystick.d.ts.map