Files
FreeJ/scripts/javascript/examples/joystick.js
2009-11-07 12:28:48 +01:00

26 lines
484 B
JavaScript

//
// freej joystick controller settings
// basic template by jaromil
//
joy = new JoystickController();
register_controller( joy );
joy.axismotion = function(which, axis, value) {
echo("joystick " + which +
" axis " + axis +
" value " + value);
};
joy.button = function (which, button, state) {
echo("joystick " + which +
" button " + button +
" state " + state);
};
joy.init_rumble("/dev/input/event9");
joy.rumble(0);