Ejecta icon indicating copy to clipboard operation
Ejecta copied to clipboard

add allowsRotation to gamepad

Open finscn opened this issue 10 years ago • 0 comments

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.

finscn avatar Dec 30 '15 15:12 finscn