forked from MajorVictory/3DDiceRoller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.html
241 lines (211 loc) · 7.1 KB
/
help.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="DnD, dangeon and dragons, roleplay, dice, roller, 3D, RPG, wargame"/>
<meta name="description" content="Online 3D dice roller"/>
<title>Major's 3D Dice</title>
<link rel="stylesheet" type="text/css" href="./includes/themes/default/style.css">
<script type="module" src="./includes/Teal.js"></script>
<script type="text/javascript" src="./libs/three.min.js"></script>
<script type="text/javascript" src="./libs/cannon.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="./libs/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" src="./libs/spectrum.js"></script>
<style type="text/css">
#dice_list {
display: flex;
flex-flow: row wrap;
border: 1px solid white;
}
dt {
flex-basis: 25%;
text-align: center;
color: white;
font-size: 135%;
padding: 2px 4px;
border-bottom: 1px dashed white;
background-color: rgba(0,0,0,0.25);
}
dd {
flex-grow: 1;
padding: 2px 4px;
margin: 0px;
border-bottom: 1px solid white;
}
dd.dicename {
flex-basis: 70%;
border-bottom: 1px dashed white;
text-align: right;
color: white;
font-size: 135%;
padding: 2px 4px;
background-color: rgba(0,0,0,0.25);
}
dd.dicedata {
text-align: left;
}
dd.dicevalues {
flex-basis: 55%;
}
b {
font-weight: bold;
font-size: 110%;
}
#flex_container {
display: flex;
flex-flow: row wrap;
}
#flex_container fieldset {
min-width: 25em;
}
.one_third {
max-width: 28%;
flex-basis: 28%;
flex-grow: 1;
}
section {
margin-top: 3em;
padding: 5px;
text-align: left;
border: 1px solid white;
}
section > h2 {
position: relative;
top: -1.5em;
display: inline-block;
border-width: 1px 1px 0px 1px;
border-color: white;
border-style: solid;
margin: -9px -6px;
padding: 5px;
}
section > div {
position: relative;
top: -1em;
}
ul {
margin: 0px;
}
</style>
</head>
<body>
<div class="center_field">
<fieldset>
<h1>Help and Reference</h1>
</fieldset>
<div id="flex_container">
<fieldset class="one_third">
<legend class="fav_name">Known Dice Types</legend>
<dl id="dice_list">
</dl>
</fieldset>
<fieldset id="function_list" class="one_third">
<legend class="fav_name">Function Reference</legend>
<div id="function_template" style="display:none; visibility:hidden;">
<section>
<h2>{@Name}</h2>
<pre>{@Usage}</pre>
{@Description}
<div>
<h3>Arguments</h3>
<ul>{@Arguments}</ul>
<h3>Examples</h3>
<ul>{@Examples}</ul>
</div>
</section>
</div>
</fieldset>
</div>
</div>
<fieldset id="control_panel_buttons" class="noselect">
<button id="cp_showsettings" title="Show Settings Panel">⚙️</button>
<button id="cp_joincreate" title="Join or Create a Room">👥</button>
</fieldset>
<fieldset id="control_panel" class="noselect" style="display:none;">
<legend>Settings</legend>
<fieldset>
<legend>Dice</legend>
<div>
<label id="colorname" class="control_label" for="color">Theme: </label>
<select id="color" name="color"></select><select id="texture" name="texture"></select><select id="material" name="material"></select>
<label for="checkbox_allowdiceoverride" title="Allow some dice to override your color settings"><input type="checkbox" value='' id="checkbox_allowdiceoverride"> Allow Some Dice to Override Colors</label>
<p>Star Wars dice have themes they can use individually.</p>
<label for="system" title="Select which type of dice to display">Set:</label>
<select id="system" name="system"></select>
</div>
</fieldset>
<fieldset>
<legend>Site Theme</legend>
<div>
<label for="theme" title="Set an overall color theme for the page">Theme:</label>
<select id="theme" name="theme"></select>
<label for="fgcolor">Foreground:</label>
<input id="fgcolor" class="control_fgcolor" value="rgb(0,255,0)" />
<label for="bgcolor">Background:</label>
<input id="bgcolor" class="control_bgcolor" value="rgb(0,255,0)" />
</div>
</fieldset>
<fieldset>
<legend>Da Graphecs</legend>
<div>
<label for="checkbox_bumpmap" title="Enable/Disable Bumpmapping"><input type="checkbox" value='' id="checkbox_bumpmap"> Bumpmapping</label>
<label for="checkbox_shadows" title="Enable/Disable Shadows"><input type="checkbox" value='' id="checkbox_shadows"> Shadows</label>
<p>May speed up rendering.<br>Recommend off for chroma keying.</p>
<label for="checkbox_sounds" title="Enable/Disable Sound Effects"><input type="checkbox" value='' id="checkbox_sounds"> Sound Effects</label>
<select id="surface" name="surface">
<option value="felt">Felt</option>
<option value="wood_tray">Wood Tray</option>
<option value="wood_table">Wood Table</option>
<option value="metal">Metal</option>
</select>
<p>Can cause lag on older browsers or systems.</p>
<label for="volume_slider">Sounds Effects Volume: </label>
<div id="volume_slider"><div id="volume_handle" class="ui-slider-handle"></div></div>
</div>
</fieldset>
<fieldset>
<legend>Elements</legend>
<div>
<button id="toggle_selector" title="Show/Hide Throw Buttons">Toggle Dice Buttons</button>
<label for="checkbox_tally" title="Show/Hide Dice Tally"><input type="checkbox" value='' id="checkbox_tally"> Show Dice Tally</label>
<label for="checkbox_users" title="Show/Hide Userlist"><input type="checkbox" value='' id="checkbox_users"> Show Userlist</label>
</div>
</fieldset>
<br><br>
<div class="connection_message control_label" style="color:orange">Loading Textures...</div>
<button id="cp_hidesettings" title="Close Settings Panel">✔️</button>
</fieldset>
<script type="module" src="./includes/DiceRoller.js"></script>
<script type="text/javascript" defer="defer">
function createFunctionListing(data = {}) {
var content = $('#function_template').html();
const itemprops = Object.entries(data);
for (var [key, value] of itemprops) {
let outValue = '';
if (key == 'Arguments') {
for (const [argName, argValues] of Object.entries(value)) {
if (argName != 'None') {
outValue += '<dl>';
outValue += '<dt>'+argName+':</dt><dd>'+argValues.join('</dd><dd>')+'</dd>';
outValue += '</dl>';
} else {
outValue += '<li>None</li>';
}
}
}
if (key == 'Examples') {
for (const [example, exampleDesc] of Object.entries(value)) {
outValue += '<li><pre>'+example+'</pre>: '+exampleDesc+'</li>';
}
}
content = content.split('{@'+key+'}').join(outValue || value);
}
let newentry = $(content).addClass('function_entry');
newentry.appendTo('#function_list').show();
}
</script>
</body>
</html>