-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
134 lines (100 loc) · 3.25 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Ancients of Defence</title>
<!-- Babylon.js -->
<script src="td/js/libs/pep.min.js"></script>
<script src="td/js/libs/dat.gui.min.js"></script>
<script src="td/js/libs/ammo.js"></script>
<script src="td/js/libs/cannon.js"></script>
<script src="td/js/libs/Oimo.js"></script>
<script src="td/js/libs/gltf_validator.js"></script>
<script src="td/js/libs/earcut.min.js"></script>
<script src="td/js/libs/babylon.js"></script>
<script src="td/js/libs/babylon.inspector.bundle.js"></script>
<script src="td/js/libs/babylonjs.materials.min.js"></script>
<script src="td/js/libs/babylonjs.proceduralTextures.min.js"></script>
<script src="td/js/libs/babylonjs.postProcess.min.js"></script>
<script src="td/js/libs/babylonjs.loaders.js"></script>
<script src="td/js/libs/babylonjs.serializers.min.js"></script>
<script src="td/js/libs/babylon.gui.min.js"></script>
<script src="td/js/libs/sweetalert2.js"></script>
<link rel="shortcut icon" href="td/textures/shortcut.png" />
<link rel="stylesheet" href="td/js/libs/bootstrap.min.css">
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#renderCanvas {
width: 100%;
height: 100%;
touch-action: none;
}
div.mid {
width: 300px;
height: 300px;
background-color: #eeddff;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
</style>
</head>
<body>
<canvas id="renderCanvas"></canvas>
<div id="MATCHING">
<div class="container">
<div class="row">
<div class="col-4">
</div>
<div style="margin-top: 100px;" class="col-4">
<center>
<btn id="newGameId" class="btn btn-lg btn-success">New</btn>
</center>
<br/>
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Join</th>
</tr>
</thead>
<tbody id="table">
<tr>
<th scope="row">Active</th>
<td>Column content</td>
</tr>
</tbody>
</table>
</div>
<div class="col-4">
</div>
</div>
</div>
</div>
<div id="x"></div>
</body>
<script type="module">
import {ViewManager} from "./td/js/view.js";
ViewManager.ChangeView("x")
import {Setup} from './td/js/setup.js'
Setup();
import {WS} from './td/js/network.js'
import {Messages} from "./td/js/msg.js";
WS.SetupFromScratch()
setTimeout(check, 1000);
function check() {
if (!WS.connected()) {
Messages.ErrorAlert("Websocket connection", "Failed to connect. Refresh the page.")
}
}
</script>
</html>