-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.html
218 lines (204 loc) · 10.2 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
<!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>
</head>
<body>
<input type="hidden" id="parent_notation" value="">
<input type="hidden" id="parent_roll" value="0">
<div id="waitform"></div>
<div id="loginform">
<div style="display: table-cell; vertical-align: middle">
<div style="margin-left: auto; margin-right: auto; width: 100%">
<div class="loginform">
<fieldset>
<h1>Major's 3D Dice Roller</h1>
</fieldset>
<fieldset>
<legend>Offline Dice</legend>
<div class="lform">
<button id="button_single" title="Roll for Myself">Roll for Myself</button>
</div>
</fieldset>
<fieldset>
<legend>Join / Create a Room</legend>
<div class="connection_message control_label" style="color:orange">Loading Textures...</div>
<div class="lform">
<div>Player Name</div>
<input id="input_user" type="text" maxlength="35" value=""></input>
<div>Room Name</div>
<input id="input_room" type="text" maxlength="35" value=""></input>
<div>Room Password (optional)</div>
<input id="input_pass" type="password" maxlength="100" value=""></input>
<div id="login_message"></div>
<p>Room Name and Password are case sensitive.</p>
</div>
<br/>
<button id="button_join" title="Join Friends">Join Friends</button>
</fieldset>
<fieldset style="text-align: left">
<legend>What's New</legend>
<div class="lform">
<h2>November 1, 2021</h2>
<ul>
<li>Bugfix: Improved connection handling if connection is lost</li>
<li>New: <a href="help.html">New Help Page</a> that lists all the dice and some functions</li>
</ul>
<h2>August 28, 2020</h2>
<ul>
<li>Bugfix: fixed loading error for some phone browsers</li>
<li>Bugfix: fixed issue where settings were not responding to touch input.</li>
<li>New: Materials! Textures can now be shiny or dull.</li>
<li>New: Coin™! A coin (1dc) has been added to the D20 set.</li>
<li>New Site Themes: 'Neo-New-Future-City' and 'Cage Town'</li>
<li>Lighting has been updated, all themes now have a proper cubemap for reflections.</li>
</ul>
<h2>July 25, 2020</h2>
<ul>
<li>New Textures: Bronze (01, 02, 03, 03a, 03b, 04) submitted by @SpencerThayer</li>
<li>New Colorset: 'Thylean Bronze' submitted by @SpencerThayer</li>
</ul>
<h2>July 20, 2020</h2>
<ul>
<li>New Textures: Dragon, Lizard, and Bird</li>
<li>New Colorsets: 'Here be Dragons', and 'Bird Up!'</li>
<li>Updating the Site Theme no longer requires a page reload</li>
<li>Site Theme has color options for text and background</li>
<li>You can now hide the Dice Tally and User List</li>
<li>The settings dialog has recieved a facelift</li>
</ul>
</div>
</fieldset>
<fieldset>
<legend>Attributions</legend>
<div class="smalllabel">Source code available at <a href="https://github.com/MajorVictory/3DDiceRoller">github.com</a></div>
<div class="smalllabel">Created using <a href="http://threejs.org">three.js</a> and <a href="http://cannonjs.org">cannon.js</a></div>
<div class="smalllabel">Original source code and idea from<br><a href="http://www.teall.info/2014/07/multiplayer-3d-dice-roller.html">Tealyatina's Dice roller</a></div>
<div class="smalllabel">Usable in FoundryVtt as the <br><a href="https://foundryvtt.com/packages/dice-so-nice/">Dice So Nice!</a> module</div>
<div class="smalllabel"><span style="font-family: 'SWRPG-Symbol-Regular';">Zatsfxyz</span> Star Wars™ RPG font from <a href="http://thealexandrian.net/wordpress/37660/roleplaying-games/star-wars-force-and-destiny-system-cheat-sheet">The Alexandrian</a></div>
<div class="smalllabel"><span style="font-family: 'Armada-Symbol-Regular';">EFG</span> Star Wars™ Armada font from <a href="https://boardgamegeek.com/filepage/116568/armada-icon-fonts">err404</a></div>
<div class="smalllabel"><span style="font-family: 'XWing-Symbol-Regular';">cdfe</span> Star Wars™ X-Wing font from <a href="https://github.com/geordanr/xwing-miniatures-font">geordanr</a></div>
<div class="smalllabel"><span style="font-family: 'Legion-Symbol-Regular';">hcosd</span> Star Wars™ Legion font from <a href="https://github.com/lyerelian/Legion-font">lyerelian</a></div>
</fieldset>
</div>
</div>
</div>
</div>
<div id="desk" class="noselect">
<div class="connection_message control_label" style="color:orange">Connection: </div>
<div id="selector_div" style="display: none">
<div class="center_field">
<div>
<button id="clear" title="Reset Dice">❌</button>
<button id="save" title="Save Favorite">❤️</button>
<input type="text" id="set" name="set" value="2d20"></input>
<button id="rage" title="Add Rage">💢</button>
<button id="throw" title="Throw Dice">🎲</button>
</div>
<div id="sethelp">
Click to Add, Drag to Throw
</div>
<div id="labelhelp">
Click to continue, Drag to throw again
</div>
</div>
</div>
<div id="canvas"></div>
<div id="info_div" style="display: none">
<div class="center_field">
<div id="label"></div>
</div>
</div>
</div>
<div id="bottom-panel">
<div id="teal-chat" style="display: none">
<div id="teal-chat-messages"></div>
<textarea id="teal-chat-input"></textarea>
</div>
<div id="teal-userlist" style="display: none;">
<h2 id="roomname"></h2>
<ul id="users"></ul>
</div>
</div>
<div id="fav_container">
<fieldset class="fav_draggable">
<legend class="fav_name">Attack</legend>
<button class="fav_edit" title="Edit Favorite Name">✏️</button><button class="fav_delete" title="Delete Favorite">❌</button><input type="text" class="fav_notation" value="2d20"></input>
<button class="fav_throw" title="Throw Dice">🎲</button>
<input type="hidden" class="fav_colorset" value=""></input>
<input type="hidden" class="fav_texture" value=""></input>
</fieldset>
</div>
<fieldset id="control_panel_buttons" class="noselect">
<button id="cp_showsettings" title="Show Settings Panel">⚙️</button>
<button id="cp_showhelp" title="View Help Page">❔</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>
</body>
</html>