Ejecta
Ejecta copied to clipboard
add allowsRotation to gamepad
Users could set gamepad.allowsRotation by themselves as same as exitOnMenuPress.
example:
var gamepads = navigator.getGamepads();
var gamepad = gamepads[1] || gamepads[0];
if (!gamepad) {
// console.log('No Gamepads connected');
return;
}
gamepad.allowsRotation = true;
I think in Game , allowsRotation =true is more useful ,so default value is true.