Skip to content
Samir Zahran edited this page May 18, 2017 · 2 revisions

Type: Object {analogSticks: {…}, buttons: {…}}

Returns all of the buttons and analog sticks of the gamepad.

Values for buttons are represented as [[Button objects|Button Events#button-objects]] and for analog sticks as [[AnalogStick objects|Analog Stick Events#analogstick-objects]].

Example

var controller = Controller.getController(0);

console.log(controller.inputs);
>> Object {
>>     analogSticks: {},
>>     buttons: {}
>> }

console.log(controller.inputs.buttons);
>> Object {
>>     DPAD_DOWN: Button,
>>     DPAD_LEFT: Button,
>>     
>>     START: Button,
>>     HOME: Button
>> }

console.log(controller.inputs.analogSticks);
>> Object {
>>     LEFT_ANALOG: AnalogStick,
>>     RIGHT_ANALOG: AnalogStick
>> }
Clone this wiki locally