-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·165 lines (150 loc) · 4.89 KB
/
index.html
File metadata and controls
executable file
·165 lines (150 loc) · 4.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="Hi Score Boys">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="nobu-e753">
<meta name="description" content="GcScanner : Input device scanner for GameControllerizer">
<link rel="stylesheet" href="./css/normalize.css">
<link rel="stylesheet" href="./css/milligram.min.css">
<title>GcScanner : Input Device Scanner for GameControllerizer</title>
<script src="./js/gc_gamepad_scanner.js"></script>
<script src="./js/gc_mouse_scanner.js"></script>
<script src="./js/gc_keyboard_scanner.js"></script>
<script src="./js/main.js"></script>
<!-- Custom styles for this template -->
<style>
body {
font-family: helvetica, arial, 'hiragino kaku gothic pro', meiryo, 'ms pgothic', sans-serif;
background-color: #F4F4F4;
text-align: center;
}
section {
text-align: left;
}
.header {
text-align: center;
padding: 2rem;
}
.footer {
text-align: center;
margin-top: 1rem;
background-color: #EEEEEE;
}
.container {
max-width: 75rem;
}
.history {
font-family: helvetica, arial, 'hiragino kaku gothic pro', meiryo, 'ms pgothic', sans-serif;
font-size: 1.25rem;
overflow: hidden;
resize:none;
height: 13.5rem;
}
</style>
</head>
<body oncontextmenu="return false;">
<div class="container">
<!-- header -->
<section class="header">
<h1>GcScannerJs</h1>
</section>
<!-- Information -->
<section>
<h3>Device inputs</h3>
<input type="checkbox" id="dev_gamepad" onclick="resetDev(); resetHistory();"
><label class="label-inline" for="dev_gamepad" >Gamepad</label>
<input type="checkbox" id="dev_mouse" onclick="resetDev(); resetHistory();"
><label class="label-inline" for="dev_mouse" >Mouse</label>
<input type="checkbox" id="dev_keyboard" onclick="resetDev(); resetHistory();"
><label class="label-inline" for="dev_keyboard">Keyboard</label>
(<input type="checkbox" id="dev_moveless" onclick="resetDev(); resetHistory();"
><label class="label-inline" for="dev_moveless">moveless</label>)
<textarea class=history id="event_history" rows="9"></textarea>
</section><br>
<!-- description -->
<section>
<h3>About</h3>
Broweser-based input device scanner for
<a href="https://github.com/GameControllerizer/GameControllerizer">GameControllerizer</a>. Control operations from a input device is scanned, then sent to Node-RED via Websocket (<code>ws://[wshost]:[wsport]/{gamepad,mouse,keyboard}</code>).
</br>
<b>When you use FireFox, set</b> "network.websocket.allowInsecureFromHTTPS" to <b>true</b>.
</section><br><br>
<!-- query paraemters -->
<section>
<h3>Query parameters</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>fps</td>
<td>Int</td>
<td>Device scanning fps (default=30)</td>
</tr>
<tr>
<td>gamepad_id</td>
<td>Int</td>
<td>Gamepad id (default=0)</td>
</tr>
<tr>
<td>gamepad_model</td>
<td>Int</td>
<td>Gamepad model (default=1) <br>
1 : Digital (1-dpad,12-buttons)<br>
2 : Analog (1-dpad,12-buttons,4-axes)<br>
0 : Custom (* see below section)<br>
<i>(Recommended : Xinput gamepad, PS3 gamepad + button remapping tool)</i>
</td>
</tr>
<tr>
<td>wshost</td>
<td>String</td>
<td>Target host (default=location.hostname)</td>
</tr>
<tr>
<td>wsport</td>
<td>Int</td>
<td>Target port (default=1880)</td>
</tr>
<tr>
<td>enable_gamepad<br>
enable_mouse<br>
enable_keyboard<br>
enable_moveless
</td>
<td>Int</td>
<td>
Initial device input status (default=0)<br>
0 : false<br>
1 : true
</td>
</tr>
</tbody>
</table>
* check browser console logs for current status.
</section><br><br>
<section>
<h3>Custom gamepad</h3>
If you want to use your own gamepad,
<p>
<ol>
<li> Edit <code>'js/gc_gamepad_scanner.js'</code>
<li> Reload <code>'index.html'</code> with the query parameter (<code>'gamepad_model=0'</code>)
</ol>
</p>
</section><br><br>
<!-- footer -->
<section class="footer">
<small>© 2018 Hi Score Boys</small>
</section>
</div>
</body>
</html>