gamecontroller.js
gamecontroller.js copied to clipboard
Add touchstart/touchend events
Touchstart/touchend events are triggered when the user places their fingers on top of the button/joystick, or moves them out.
It is a property of the Gamepad API, but it is not available in all joysticks. So don't worry if the results may be choppy.
Then new event names will be the same that we have, adding "touchstart" and "touchend" at the end of it. E.g.: button0touchstart, button0touchend, etc.