/** Must match `rive::kGamepadBatchWireVersion` (runtime/include/rive/input/gamepad_batch.hpp). */ export declare const GAMEPAD_BATCH_VERSION = 2; export declare const GAMEPAD_MAX_BUTTONS = 32; export declare const GAMEPAD_MAX_AXES = 16; /** C++ `rive::GamepadRecordType`. */ export declare enum GamepadRecordType { Connected = 0, Update = 1, Disconnected = 2 } /** C++ `rive::GamepadInputChangeKind`. */ export declare enum GamepadChangeKind { Button = 0, Axis = 1 } /** C++ `rive::GamepadMappingKind`. */ export declare enum GamepadMappingKind { Standard = 0, Unknown = 1 } /** * Builds buffer to send to the state machine for gamepad input connection/updates/disconnect. * * Each `update` record carries a single change: the core * applies and dispatches records in order, so N single-change records in one batch behave like * N separate submits. * * `end()` returns a view into a reused scratch buffer, valid until the next `begin()`. */ export declare class GamepadBatchEncoder { private buffer; private view; private bytes; private offset; constructor(initialCapacity?: number); begin(): void; /** True when no records were written since `begin()`. */ get isEmpty(): boolean; /** Set up buffer size/initialized values for a connected device */ connected(deviceId: number, mapping: GamepadMappingKind, buttonValues: ArrayLike, axes: ArrayLike): void; /** */ update(deviceId: number, kind: GamepadChangeKind, index: number, value: number): void; disconnected(deviceId: number): void; end(): Uint8Array; /** ---------------- Helper/private methods ---------------- */ private writeU8; private writeU32; private writeI32; private writeF32; private ensure; }