diff --git a/README.md b/README.md index 79c7068..2f32ce2 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ import Unswitch from 'unswitch'; // Create the listener const unswitch = new Unswitch({ + side: 'L', // or R b: (pressed) => {}, a: (pressed) => {}, y: (pressed) => {}, @@ -50,7 +51,7 @@ function render() { render(); ``` -Calling `unswitch.update()` will check every button for a change in state. If a callback is provided the new state is passed along. The axis works in the same way, but instead of a `boolean` it will return a `number` from 0 to 8. Number 0 to 7 are for the joystick positions going clockwise, number 8 is used as default (center). +It's possible to connect up to two controllers at the same time. To make this work `side` is to be passed with either `L` (left) or `R` (right) for the controllers respectively. Calling `unswitch.update()` will check every button for a change in state. If a callback is provided the new state is passed along. The axis works in the same way, but instead of a `boolean` it will return a `number` from 0 to 8. Number 0 to 7 are for the joystick positions going clockwise, number 8 is used as default (center). > Buttons are mapped based on a single controller positioned horizontally.