This repository was archived by the owner on Feb 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·172 lines (154 loc) · 5.04 KB
/
index.html
File metadata and controls
executable file
·172 lines (154 loc) · 5.04 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
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<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/model_dsimple.js"></script>
<script src="./js/gc_gamepad_scanner/model_dclassic.js"></script>
<script src="./js/gc_gamepad_scanner/model_analog.js"></script>
<script src="./js/gc_gamepad_scanner/model_custom.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;
}
.button-black {
background-color: rgb(96, 108, 118);
border-color: rgb(96, 108, 118);
}
.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>GcScanner</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>
Input Device Scanner for
<a href="https://github.com/nobu-e753/GameControllerizer">GameControllerizer</a>. Control signals from a input device is scanned, then sent to Node-RED via Websocket.
<b>FireFox</b> browser is strongly recommended.
</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 simple0 (1-dpad,n-buttons)<br>
2 : Digital simple1 (1-dpad,n-buttons)<br>
3 : Digital classic (n-buttons)<br>
4 : Analog simple (1-dpad,n-buttons,4-axes)<br>
0 : Custom gamepad (* see below section)<br>
<i>(Recommended : Xinput, PS3 + 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>
</tbody>
</table>
* check browser console logs for current status.
</section><br><br>
<section>
<h3>local hosting</h3>
GcScanner can be executed on local http server such as npm-http-server.
<pre><code>$ npm install http-server
$ git clone [this repository]
$ cd [target dir]
$ http-server</code></pre>
</section><br>
<section>
<h3>Custom gamepad</h3>
If you want to use your own gamepad,
<p>
<ol>
<li> "Local hosting" (above section)
<li> Edit 'js/gc_gamepad_scanner/model_custom.js'
<li> Reload 'index.html' with the query parameter ('gamepad_model=0')
</ol>
</p>
</section><br><br>
<!-- footer -->
<section class="footer">
<small>© 2018 ToG Project</small>
</section>
</div>
</body>
</html>