dot big bang

Developer API
Menu

Class Input

All
  • Public
  • Public/Protected
  • All

Hierarchy

  • Input

Index

Properties

Accessors

Properties

Readonly controls

controls: Controls

The current state of the simplified Controls object. This object presents a simple input device with two buttons and two sticks which are automatically mapped by the system to the actual physical input devices available on the local machine: keyboard, mouse, gamepad, and on-screen touch controls on mobile. It is the recommended Input object to use for getting games up and running quickly.

Readonly keyboard

keyboard: Keyboard

The current state of the keyboard.

Readonly mouse

mouse: Mouse

The current state of the mouse.

Accessors

gamepads

  • get gamepads(): (null | Gamepad)[]
  • The current state of the gamepads. The array might contain null entries, so its length doesn't necessarily represent the number of gamepads currently connected. This property maps closely to the getGamepad() function of standard Gamepad Web API, see https://w3c.github.io/gamepad/#dom-navigator-getgamepads

    Returns (null | Gamepad)[]