-
Notifications
You must be signed in to change notification settings - Fork 16
inputs
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]].
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
>> }The MIT License (MIT)
Copyright © 2016 Samir Zahran
Setup
Buttons & Analog Sticks
Controller Layouts
Configuring Settings
Controller Events
Button Events
Analog Stick Events
Controller.supported
Controller.controllers
Controller.controllerCount
Controller.search()
Controller.getController()
Controller.watchAll()
Controller.unwatchAll()
.connectedTimestamp
.id
.index
.inputs
.layoutInfo
.name
.watch()
.unwatch()
Settings Objects
List of Settings
settings.list()
settings.clear()
settings.update()
→ Grunt Tasks
→ Registering Settings
→ Creating Layout Maps