-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
261 lines (161 loc) · 11.7 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
<!DOCTYPE html>
<html>
<head>
<title>farkadadnan</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, shrink-to-fit=no">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&family=Silkscreen&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script src="libs/three.js"></script>
<script src="libs/TransformControls.js"></script>
<script src="libs/GLTFLoader.js"></script>
<script src="libs/DRACOLoader.js"></script>
<script src="libs/SkeletonUtils.js"></script>
<script src="libs/EffectComposer.js"></script>
<script src="libs/RenderPass.js"></script>
<script src="libs/ShaderPass.js"></script>
<script src="libs/CopyShader.js"></script>
<script src="libs/FXAAShader.js"></script>
<script src="libs/GLTFExporter.js" defer></script>
<script src="libs/lzjs.js"></script>
<script src='libs/virtualjoystick.js'></script>
<script src='libs/firebase.min.js'></script>
<script src="js/init.js"></script>
<script src="js/loop.js"></script>
<script src="js/input.js"></script>
<script src="js/atlas.js"></script>
<script src="js/controler.js"></script>
<script src="js/charaAnim.js"></script>
<script src="js/Utils.js"></script>
<script src="js/CameraControl.js"></script>
<script src="js/Easing.js"></script>
<script src="js/Stamina.js"></script>
<script src="js/Interaction.js"></script>
<script src="js/DynamicItems.js"></script>
<script src="js/MapManager.js"></script>
<script src="js/Optimizer.js"></script>
<script src="js/gameState.js"></script>
<script src="js/AssetManager.js"></script>
<script src="js/SocketIO.js"></script>
<script src="js/soundMixer.js"></script>
<script src="js/userTiles.js"></script>
</head>
<body>
<audio loop id="music" preload="auto" style="display: none">
<source src="assets/sounds/music/AK+-+Pulses.ogg" type="audio/ogg">
</audio>
<script src="js/main.js"></script>
<!-- General Game UI -->
<canvas id="world"></canvas>
<div id="stamina-bar"></div>
<div id="overlay"></div>
<div id="message-box" class="dialogue-box"></div>
<!-- Dialogue UI -->
<div id="char-container">
<div id="char-img-cont">
<img class="char-img" id="img-camper" src="assets/char-pictures/char-picture-alpinist.png">
<img class="char-img" id="img-lady" src="assets/char-pictures/char-picture-lady.png">
<img class="char-img" id="img-dev" src="assets/char-pictures/char-picture-dev.png">
</div>
</div>
<div id="talk-container" class='dialogue-box'>
<div id="talk-subcontainer">
<div id="text-container"></div>
<div id="answers-container"></div>
</div>
</div>
<div id="talker-name-container" class='dialogue-box'>Name</div>
<!-- Black screen for death -->
<div id="black-screen">
<img id="loading-icon" src="assets/loading-icon.gif">
</div>
<!-- UI Buttons -->
<div id='joystick-container'></div>
<img id="action-button" src="assets/action.png">
<!-- Title background -->
<img id="title-background" src="assets/home_background.png">
<!-- Menus -->
<div id="start-menu">
<div id="title-image-container">
<!-- <img id="title" src="assets/title.png"> -->
<br>
<h1 class="title">A game by farkadadnan</h1>
</div>
<div id="menu-element">
<div>
Your display name:
<div class="input">
<input type="text" autocomplete="off" id="game-name" maxlength="15" placeholder="(for multiplayer)" onclick="this.select()"></input>
<button
onclick="this.previousSibling.value = utils.randomDisplayName()"> </button>
</div>
Your game pass:
<div class="input">
<input type="text" autocomplete="off" id="game-pass" maxlength="15" placeholder="(for multiplayer)" onclick="this.select()"></input><button
onclick="this.previousSibling.value = utils.randomString()"> </button>
</div>
<div id="start-button">
Start
<div id="start-background">
<div id="start-loaded"></div>
</div>
</div>
</div>
</div>
<div id="credits">
<div>
<span class="section-title">Music :</span>
<br>
<a target="_blank" href="https://stromnoir.bandcamp.com/">Strom Noir</a>,
<a target="_blank" href="https://simonbainton.bandcamp.com/">Simon Bainton</a>,
<a target="_blank" href="http://www.tobiashellkvist.com/">Tobias Hellkvist</a>,
<a target="_blank" href="https://soundcloud.com/andrewodd/">Andrew Odd</a>,
<a target="_blank" href="https://www.kylepreston.com/">Kyle Preston</a>
</div><div>
<span class="section-title">About :</span>
<br>
<a target="_blank" href="https://linktr.ee/farkadadnan">farkadadnan</a>
<a target="_blank" href="https://www.facebook.com/profile.php?id=100002145048612">facebook</a>
<a target="_blank" href="https://www.instagram.com/farkadadnan/">instagram</a>
<a target="_blank" href="https://www.linkedin.com/in/farkad-adnan-499972121/">linkedin</a>
<a target="_blank" href="https://github.com/FarkadAdnan">github</a>
<br>
</div>
</div>
</div>
<!-- TEMPORARY -->
<div id="gui">
<button id="tile-add" title="Add the tile"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 3v6h2V5h4V3H3zm2 12H3v6h6v-2H5v-4zm14 4h-4v2h6v-6h-2v4zm2-16h-6v2h4v4h2V3zm-4 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z" fill="currentColor"/></svg></button>
<button id="tile-remove" title="Remove the tile"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 3v6h2V5h4V3H3zm2 12H3v6h6v-2H5v-4zm14 4h-4v2h6v-6h-2v4zm2-16h-6v2h4v4h2V3zm-4 10H7v-2h10v2z" fill="currentColor"/></svg></button>
<button id="tile-properties" title="Tile properties"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 3v6h2V5h4V3H3zm2 12H3v6h6v-2H5v-4zm14 4h-4v2h6v-6h-2v4zm2-16h-6v2h4v4h2V3z" fill="currentColor"/><path d="M19.44 12.99l-.01.02c.04-.33.08-.67.08-1.01 0-.34-.03-.66-.07-.99l.01.02 2.44-1.92-2.43-4.22-2.87 1.16.01.01c-.52-.4-1.09-.74-1.71-1h.01L14.44 2H9.57l-.44 3.07h.01c-.62.26-1.19.6-1.71 1l.01-.01-2.88-1.17-2.44 4.22 2.44 1.92.01-.02c-.04.33-.07.65-.07.99 0 .34.03.68.08 1.01l-.01-.02-2.1 1.65-.33.26 2.43 4.2 2.88-1.15-.02-.04c.53.41 1.1.75 1.73 1.01h-.03L9.58 22h4.85s.03-.18.06-.42l.38-2.65h-.01c.62-.26 1.2-.6 1.73-1.01l-.02.04 2.88 1.15 2.43-4.2s-.14-.12-.33-.26l-2.11-1.66zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" fill="currentColor" transform="translate(12 12) scale(0.66 0.66) translate(-12 -12)"/></svg></button>
<button id="tile-save" title="Save user tiles"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 3v6h2V5h4V3H3zm2 12H3v6h6v-2H5v-4zm14 4h-4v2h6v-6h-2v4zm2-16h-6v2h4v4h2V3zM13 14.7l2.6-2.6 1.4 1.4-5 5-5-5 1.4-1.4 2.6 2.6V6h2v8.7z" fill="currentColor"/></svg></button>
<button id="cube-add" title="Add the box"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M21 3H3v18h18V3zm-4 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z" fill="currentColor"/></svg></button>
<button id="cube-remove" title="Remove the box"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 3H3v18h18V3zm-4 10H7v-2h10v2z" fill="currentColor"/></svg></button>
<button id="cube-properties" title="Box properties"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 3H3v18h18V3zm-1.75 9c0 .24-.02.47-.05.71l.01-.02 1.47 1.16c.14.1.23.18.23.18l-1.7 2.94-2.02-.8.02-.03c-.37.29-.77.53-1.21.71h.01l-.27 1.85c-.02.17-.04.3-.04.3h-3.4l-.31-2.15H10c-.44-.18-.84-.42-1.21-.71l.02.03-2.02.8-1.7-2.94s.1-.08.23-.18l1.47-1.16.01.02c-.03-.24-.05-.47-.05-.71s.02-.47.05-.69l-.01.01-1.7-1.34 1.7-2.95 2.01.81v.01c.37-.28.77-.52 1.2-.7h-.01L10.3 5h3.41l.3 2.15H14c.43.18.83.42 1.2.7v-.01l2.01-.81 1.7 2.95-1.71 1.34-.01-.01c.04.22.06.45.06.69z" fill="currentColor"/><circle cx="12" cy="12" r="3" fill="currentColor"/></svg></button>
<button id="cube-transform" title="Box transform mode"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z" fill="currentColor"/></svg></button>
<button id="teleport" title="Jump to..."><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16.49 15.5v-1.75L14 16.25l2.49 2.5V17H22v-1.5h-5.51zm3.02 4.25H14v1.5h5.51V23L22 20.5 19.51 18v1.75zM9.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5.75 8.9L3 23h2.1l1.75-8L9 17v6h2v-7.55L8.95 13.4l.6-3C10.85 12 12.8 13 15 13v-2c-1.85 0-3.45-1-4.35-2.45l-.95-1.6C9.35 6.35 8.7 6 8 6c-.25 0-.5.05-.75.15L2 8.3V13h2V9.65l1.75-.75" fill="currentColor"/></svg></button>
<button id="json-load"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 12v7H5v-7H3v9h18v-9h-2zm-6 .67l2.59-2.58z" fill="currentColor"/><path d="M15.7 10L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z" transform="translate(24 19) rotate(180)" fill="currentColor"/></svg><input type="file" title="Load JSON"></input></button>
<button id="json-save" title="Save JSON"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 12v7H5v-7H3v9h18v-9h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z" fill="currentColor"/></svg></button>
<div id="properties" class="dialog">
<div>Type:<select autocomplete="off"></select></div>
<div>Tag:<input autocomplete="off" placeholder="(optional)" type="text"></input></div>
<button onclick="this.parentElement.style.display='none'">OK</input>
</div>
<div id="destinations" class="dialog">
<div>Current JSON:<select autocomplete="off"></select></div>
<div>Another JSON:<select autocomplete="off"></select></div>
<button onclick="this.parentElement.style.display='none'">OK</input>
</div>
<div id="cubes" class="dialog">
<div>Select a box to add:</div>
<div class="thumbs"></div>
<button onclick="this.parentElement.style.display='none'">OK</input>
</div>
</div>
</body>
</html>