-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexport_page.html
38 lines (38 loc) · 1.13 KB
/
export_page.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
<!DOCTYPE html>
<html>
<head>
<title>$GODOT_PROJECT_NAME</title>
<meta charset="UTF-8">
<style type="text/css">
body {
height: 90vh;
background-color: #252525;
background-image: url(ScaleNXSplash.png);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
.progress-div {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div class="progress-div">
<progress id="progress" value="0" max="100"> </progress>
</div>
<canvas id="canvas"></canvas>
<script src="$GODOT_URL"></script>
<script>
var engine = new Engine($GODOT_CONFIG);
function printProgress(current, total) {
document.getElementById("progress").value = 100.0 * current / total;
}
engine.startGame({ onProgress: printProgress });
</script>
</body>
</html>