-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
294 lines (255 loc) · 12.5 KB
/
index.html
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>PokittoGP Track Editor</title>
<link rel="stylesheet" href="pgpedit.css">
</head>
<body>
<div style="position=relative;">
<div class="sidepanel">
<!-- Sidepanel -->
<div class="panelrow"">
<h2 align="center">
PokittoGP
</h2>
<h1 align="center">
Track Editor
</h1>
</div>
<hr>
<div class="panelrow">
<label class="droplist-container" style="width: 100%;" title="Select mode: Tiles | Billboards | Waypoints">
<select id="mode-select">
<option value="tiles-tab">Tiles</option>
<option value="billboards-tab">Billboards</option>
<option value="waypoints-tab">Waypoints</option>
</select>
<span class="droplist-mark"></span>
</label>
</div>
<div id="tiles-tab" class="tabcontent" style="display:block;">
<div class="panelrow">
<canvas id="tileset-canvas" style="margin: 0 auto; cursor: pointer; border: 1px solid var(--border-color);"></canvas>
</div>
<div class="panelrow">
<canvas id="tilebrush-canvas" style="margin: 0 auto; border: 1px solid var(--border-color);"></canvas>
</div>
<div class="panelrow">
<button type="button" class="button" style="width: 100%;" title="Load textures from an image file" onclick="selectFile('loadtex-fileinput')">
Load Textures
<input id="loadtex-fileinput" type="file" name="file" style="display: none" />
</div>
</div>
<div id="billboards-tab" class="tabcontent"">
<div class="panelrow" style="text-align: center;">
<div class="radio" style="display: inline-block; width:100%;" title="Select and move billboards">
<input id="sel_billboard-tool" type="radio" name="billboard-action" checked="true" />
<label for="sel_billboard-tool">Select & Move</label>
</div>
<br>
<div class="radio" style="display: inline-block; width:50%;" title="Add new billboards">
<input id="add_billboard-tool" type="radio" name="billboard-action" />
<label for="add_billboard-tool">Add</label>
</div><div class="radio" style="display: inline-block; width:50%;" title="Delete billboards">
<input id="del_billboard-tool" type="radio" name="billboard-action" />
<label for="del_billboard-tool">Del</label>
</div>
</div>
<div class="panelrow" style="text-align: center;">
<canvas id="billboard-canvas" style="margin: 0 auto; border: 1px solid var(--border-color);"></canvas>
</div>
<div class="panelrow">
<label class="droplist-container" style="width: 75%;" title="Choose billboard type">
<select id="billboard-droplist">
<!-- Populated in javascript -->
</select>
<span class="droplist-mark"></span>
</label>
<div id="billboard-color" class="color-prop" style="width: 22%"></div>
</div>
</div>
<div id="waypoints-tab" class="tabcontent"">
<div class="panelrow" style="text-align: center;">
<div class="radio" style="display: inline-block; width:100%;" title="Select and move waypoints">
<input id="sel_waypoint-tool" type="radio" name="action" checked="true" />
<label for="sel_waypoint-tool">Select & Move</label>
</div>
<br>
<div class="radio" style="display: inline-block; width:50%;" title="Add new waypoints after the selected waypoint">
<input id="add_waypoint-tool" type="radio" name="action" />
<label for="add_waypoint-tool">Add</label>
</div><div class="radio" style="display: inline-block; width:50%;" title="Delete waypoints">
<input id="del_waypoint-tool" type="radio" name="action" />
<label for="del_waypoint-tool">Del</label>
</div>
</div>
<div class="panelrow">
Radius:
<div class="textprop" title="Waypoint radius">
<input id="radius-textinput" type="text" class="textprop" style="width: 100%;" />
</div>
</div>
<div class="panelrow">
Target Speed:
<div class="textprop" title="Target speed for computer players, when driving towards this waypoint [0..100]">
<input id="speed-textinput" type="text" class="textprop" style="width: 100%;" />
</div>
</div>
<div class="panelrow" style="text-align: center;" title="Also use this waypoint as a checkpoint">
<label class="checkbox-container">Checkpoint
<input id="checkpoint-boolinput" type="checkbox" checked="true">
<span class="checkbox-mark"></span>
</label>
</div>
</div>
<hr>
<div class="panelrow">
Track Name:
<div class="textprop" title="Track name (max 12 characters)">
<input id="trackname-textinput" type="text" class="textprop" maxlength="21" required style="width: 100%;" />
</div>
</div>
<div class="panelrow">
Author:
<div class="textprop" title="Author's name (max 12 characters)">
<input id="author-textinput" type="text" class="textprop" maxlength="21" style="width: 100%;" />
</div>
</div>
<div class="panelrow" style="text-align: center;">
</button><button id="physparms-button" type="button" class="button" style="width: 100%;" title="Open a dialog to change physics parameters">
Physics Parameters</button>
</div>
<div class="panelrow" style="text-align: center;">
<button type="button" class="button" style="width: 50%;" title="Load track and objects from a text file" onclick="selectFile('loadtrack-fileinput')">
Load<input id="loadtrack-fileinput" type="file" name="file" style="display: none" />
</button><button id="savetrack-button" type="button" class="button" style="width: 50%;" title="Save track, objects and textures in a zip file">
Save</button>
</div>
<hr>
<div id="numbillboards-label" class="panelrow">
Billboards:
</div>
<div id="numwaypoints-label" class="panelrow">
Waypoints:
</div>
<div class="panelrow">
Use Ctrl-Z to undo, Ctrl-Shift-Z or Ctrl-Y to redo. Hold Shift key to activate tilemap select-mode.
</div>
</div>
<div class="mainview">
<canvas id="tilemap-canvas"></canvas>
</div>
</div>
<div id="popup-container" class="popup-background">
<div class="popup-dialog" id="myForm">
<div class="panelrow">
Physics Parameters:
</div>
<div class="panelrow">
<span style="display: inline-block; width: 18%; border: var(--row-border)">
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
fs:
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
fk:
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
tract:
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
rr:
</span>
</div>
<div class="panelrow" style="padding: 0;">
<span style="display: inline-block; width: 18%; border: var(--row-border)">
Track
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Static friction (typ. 0.15-1.50)">
<input type="text" id="track_fs-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Kinetic friction (should be less than or equal to fs)">
<input type="text" id="track_fk-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Traction constant (or shear strength, typ. 500-5000)">
<input type="text" id="track_tract-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Rolling resistance (typ. 0.01-0.10)">
<input type="text" id="track_rr-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><button id="track_physparms_reset-button" type="button" class="button" title="Reset to default" style="width: 10%;">
↺</button>
</div>
<div class="panelrow" style="padding: 0;">
<span style="display: inline-block; width: 18%; border: var(--row-border)">
Terrain
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Static friction (typ. 0.15-1.50)">
<input type="text" id="terrain_fs-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Kinetic friction (should be less than or equal to fs)">
<input type="text" id="terrain_fk-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Traction constant (or shear strength, typ. 500-5000)">
<input type="text" id="terrain_tract-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Rolling resistance (typ. 0.01-0.10)">
<input type="text" id="terrain_rr-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><button id="terrain_physparms_reset-button" type="button" class="button" title="Reset to default" style="width: 10%;">
↺</button>
</div>
<div class="panelrow" style="padding: 0;">
<span style="display: inline-block; width: 18%; border: var(--row-border)">
Edge
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Static friction (typ. 0.15-1.50)">
<input type="text" id="edge_fs-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Kinetic friction (should be less than or equal to fs)">
<input type="text" id="edge_fk-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Traction constant (or shear strength, typ. 500-5000)">
<input type="text" id="edge_tract-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><span style="display: inline-block; width: 18%; padding: 0 5px; border: var(--row-border)">
<div class="textprop" title="Rolling resistance (typ. 0.01-0.10)">
<input type="text" id="edge_rr-textinput" class="textprop" style="width: 100%;" required>
</div>
</span><button id="edge_physparms_reset-button" type="button" class="button" title="Reset to default" style="width: 10%;">
↺</button>
</div>
<div class="panelrow"> </div>
<div class="panelrow">
Examples:
<br>
-Formula car, asphalt [fs:1.5, fk:1.4, tract:1500, rr:0.02]
<br>
-Sports car, asphalt [fs:1.0, fk:0.9, tract:1500, rr:0.02]
<br>
-Rally car, gravel [fs:0.65, fk:0.55, tract:700, rr:0.05]
<br>
-Rally car, snow [fs:0.30, fk:0.25, tract:1000, rr:0.02]
</div>
<div class="panelrow">
<button id="physparms_ok-button" type="button" class="button" style="width: 100%;">
Ok</button>
</div>
</div>
</div>
<script>
function selectFile(input_id) { document.getElementById(input_id).click(); }
</script>
<script type="text/javascript" src="JSZip/jszip.js"></script>
<script type="text/javascript" src="JSZip/jszip-utils.js"></script>
<!--[if IE]>
<script type="text/javascript" src="dist/jszip-utils-ie.js"></script>
<![endif]-->
<script type="text/javascript" src="settings.js"></script>
<script type="text/javascript" src="pgpedit.js"></script>
</body>
</html>