import * as rc from "../rive_advanced.mjs"; export interface GamepadInteractionsParams { /** Hold button/axis input at rest unless DOM focus is within the canvas/overlay. Pads still connect. */ requireFocus: boolean; isFocusWithin: () => boolean; /** Called when a pad connects, so an instance that stopped its loop can start polling again. */ onPadConnected: () => void; } /** * Per-Rive-instance gamepad bridge driving a single state machine. Tracks what that state * machine has been sent and submits only the difference, so after a pause it catches up * without duplicate connected events. */ export declare class GamepadInteractions { private params; private encoder; private stateMachine; private lastSentPads; private submitFailures; constructor(params: GamepadInteractionsParams); /** Whether pads need reading each frame: one is connected, or one still has to be disconnected. */ get isPolling(): boolean; /** * Poll, diff and submit one batch. Call once per frame before advancing. * @returns true when a batch was sent to the state machine */ handleGamepadInputs(time: number, stateMachine: rc.StateMachineInstance | undefined): boolean; dispose(): void; /** Writes records that bring `lastSentPads` up to `pads`, updating it as it goes. */ private encodeDiff; private encodeChanges; }