input-device-handler - v9.0.3
    Preparing search index...

    Class InputDeviceHandler

    The main export of this package. Construct one to start listening to and handling input devices.

    Hierarchy

    Index

    Constructors

    Properties

    gamepadDeadZoneSettings: AllGamepadDeadZoneSettings = {}
    globalDeadZone: number = 0

    Methods

    • Updates the internal state of all current devices and triggers all relevant listeners.

      Use this if method if you're hooking up polling to your own system. For example, if you already have a render loop, call this method to update all inputs and read their values.

      If you just want to read the last values but already have InputDeviceHandler running its loop, instead call getLastPollResults.

      Parameters

      • deadZoneSettings: Readonly<{ [key: string]: Readonly<{ [inputName: string]: number }> }> = ...
      • timestamp: number = ...
      • globalDeadZone: number = ...

        DeadZone for all inputs.

      Returns AllDevices