-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
236 lines (221 loc) · 5.74 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
<head>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<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=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js"></script>
<style>
* {
font-family: 'Press Start 2P', cursive;
box-sizing: border-box;
}
body {
background-color: black;
}
h1 {
margin: 0;
}
button {
border: 0;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #ddd;
}
</style>
</head>
<div style="display: inline-block; position: relative">
<div
id="overlappingDiv"
style="
background-color: black;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
pointer-events: none;
z-index: 10;
"
></div>
<canvas></canvas>
<div
id="characterDialogueBox"
style="
background-color: white;
width: 600px;
position: absolute;
bottom: 0;
top: 0;
right: 0;
padding: 12px;
"
>
<div data-id="example-widget" class="sec-widget" data-widget="dec79f90b983f6a8c322f3790d7e9e80"></div>
</div>
<div id="userInterface" style="display: none">
<!-- Represents health bar of draggle (enemy) -->
<div
style="
background-color: white;
width: 250px;
position: absolute;
top: 50px;
left: 50px;
border: 4px black solid;
padding: 12px;
"
>
<h1 style="font-size: 16px">Draggle</h1>
<div style="position: relative">
<div
style="height: 5px; background-color: #ccc; margin-top: 10px"
></div>
<div
id="enemyHealthBar"
style="
height: 5px;
background-color: green;
position: absolute;
top: 0;
left: 0;
right: 0;
"
></div>
</div>
</div>
<!-- Represents health bar of emby (us) -->
<div
style="
background-color: white;
width: 250px;
position: absolute;
top: 330px;
right: 50px;
border: 4px black solid;
padding: 12px;
"
>
<h1 style="font-size: 16px">Emby</h1>
<div style="position: relative">
<div
style="height: 5px; background-color: #ccc; margin-top: 10px"
></div>
<div
id="playerHealthBar"
style="
height: 5px;
background-color: green;
position: absolute;
top: 0;
left: 0;
right: 0;
"
></div>
</div>
</div>
<div
style="
background-color: white;
height: 140px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-top: 4px black solid;
display: flex;
"
>
<div
id="dialogueBox"
style="
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: white;
padding: 12px;
display: none;
cursor: pointer;
"
>
sdkfjlsdajl
</div>
<div
id="attacksBox"
style="
width: 66.66%;
display: grid;
grid-template-columns: repeat(2, 1fr);
"
></div>
<div
style="
display: flex;
align-items: center;
justify-content: center;
width: 33.33%;
border-left: 4px black solid;
"
>
<h1 id="attackType" style="font-size: 16px">Attack Type</h1>
</div>
</div>
</div>
</div>
<script>
SEC_HTTPS = true;
SEC_BASE = "compilers.widgets.sphere-engine.com";
(function(d, s, id){ SEC = window.SEC || (window.SEC = []);
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js = d.createElement(s); js.id = id;
js.src = (SEC_HTTPS ? "https" : "http") + "://" + SEC_BASE + "/static/sdk/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "sphere-engine-compilers-jssdk"));
SEC.ready=function(e){"loading"!=document.readyState&&"interactive"!=document.readyState?e():window.addEventListener("load",e)};
</script>
<script>
t=''
flag=0
SEC.ready(function() {
var afterSendSubmission = function(data) {
submissionId=data.apiSubmissionId
console.log(submissionId);
t+=submissionId
console.log(t)
flag=1
};
var SECWidget = SEC.widget("example-widget");
SECWidget.events.subscribe('afterSendSubmission',afterSendSubmission);
});
</script>
<script src='data_parsing.js'></script>
<pre></pre>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.3/howler.min.js"
integrity="sha512-6+YN/9o9BWrk6wSfGxQGpt3EUK6XeHi6yeHV+TYD2GR0Sj/cggRpXr1BrAQf0as6XslxomMUxXp2vIl+fv0QRA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"
integrity="sha512-H6cPm97FAsgIKmlBA4s774vqoN24V5gSQL4yBTDOY2su2DeXZVhQPxFK4P6GPdnZqM9fg1G3cMv5wD7e6cFLZQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="data/audio.js"></script>
<script src="data/battleZones.js"></script>
<script src="data/collisions.js"></script>
<script src="data/attacks.js"></script>
<script src="data/monsters.js"></script>
<script src="data/characters.js"></script>
<script src="js/utils.js"></script>
<script src="classes.js"></script>
<script src="index.js"></script>
<script src="battleScene.js"></script>