Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Commit a881a4b

Browse files
committed
Merge pull request #8 from bolbola/master
Configuration Function
2 parents 8c0b150 + e80d0a4 commit a881a4b

File tree

5 files changed

+318
-79
lines changed

5 files changed

+318
-79
lines changed

Readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ Where the strengths are between 0 and 255.
7777
If you have a third party controller with a different name you can specify the name when creating the controller:
7878

7979
var xbox = new XboxController('flight stick')
80+
81+
## Configuring a Third Party Controller
82+
83+
To configure a third party controller:
84+
85+
XboxController.configure();
8086

8187
## Copyright
8288

lib/buttons.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"dup": {
3+
"block": 2,
4+
"bitwise": 1
5+
},
6+
"ddown":{
7+
"block": 2,
8+
"bitwise": 2
9+
},
10+
"dleft":{
11+
"block": 2,
12+
"bitwise": 4
13+
},
14+
"dright":{
15+
"block": 2,
16+
"bitwise": 8
17+
},
18+
"start":{
19+
"block": 2,
20+
"bitwise": 16
21+
},
22+
"back":{
23+
"block": 2,
24+
"bitwise": 32
25+
},
26+
"leftstick":{
27+
"block": 2,
28+
"bitwise": 64
29+
},
30+
"rightstick":{
31+
"block": 2,
32+
"bitwise": 128
33+
},
34+
"leftshoulder":{
35+
"block": 3,
36+
"bitwise": 1
37+
},
38+
"rightshoulder":{
39+
"block": 3,
40+
"bitwise": 2
41+
},
42+
"xboxbutton":{
43+
"block": 3,
44+
"bitwise": 4
45+
},
46+
"a":{
47+
"block": 3,
48+
"bitwise": 16
49+
},
50+
"b":{
51+
"block": 3,
52+
"bitwise": 32
53+
},
54+
"x":{
55+
"block": 3,
56+
"bitwise": 64
57+
},
58+
"y":{
59+
"block": 3,
60+
"bitwise": 128
61+
}
62+
}

lib/joysticks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"leftxState": 6,
3+
"leftxPos": 7,
4+
"leftyState": 8,
5+
"leftyPos": 9,
6+
"rightxState": 10,
7+
"rightxPos": 11,
8+
"rightyState": 12,
9+
"rightyPos": 13
10+
}

lib/triggers.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"left": {
3+
"block": 4
4+
},
5+
"right": {
6+
"block": 5
7+
}
8+
}

0 commit comments

Comments
 (0)