-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.html
More file actions
72 lines (66 loc) · 2.23 KB
/
game.html
File metadata and controls
72 lines (66 loc) · 2.23 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Missing Link</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="images/icon_blue.png">
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="javascript/string_to_png.js"></script>
<script src="javascript/svg_to_png.js"></script>
<script src="javascript/toggle.js"></script>
<script src="javascript/shapes.js"></script>
<script src="javascript/color.js"></script>
<script src="javascript/graph.js"></script>
<script src="javascript/mouse_handler.js"></script>
<script src="javascript/confetti.js"></script>
<script src="javascript/game.js"></script>
<script src="javascript/level_picker.js"></script>
<script src="javascript/colorpicker.js"></script>
<script src="javascript/level_urls.js"></script>
<script>
var game;
$(function() {
var dw = 50;
var dh = 185;
var levelPickerContainer = document.getElementById('levelPicker');
var gameContainer = document.getElementById('game');
var width = window.innerWidth - dw;
var height = window.innerHeight - dh;
game = new Game(gameContainer, width, height);
const levelPicker = new LevelPicker(levelPickerContainer, game, LEVEL_URLS);
window.addEventListener('resize', () => {
game.resize(window.innerWidth - dw, window.innerHeight - dh);
});
});
</script>
<style>
body {
overflow: hidden;
touch-action: none;
}
div.levelTitle {
position: absolute;
pointer-events: none;
top: 80px;
left: 50%;
width: 80%;
transform: translate(-50%, 0);
z-index: 100;
text-shadow: 0px 0px 2px white;
}
</style>
<!-- Uncomment this to debug touch input:
<script src="https://cdn.jsdelivr.net/gh/hammerjs/touchemulator@master/touch-emulator.js"></script>
<script>TouchEmulator();</script>
---->
</head>
<body>
<img src="images/titles/title9.jpg" class="missingLinkTitle">
<!--<h1>Missing Link</h1>-->
<div id="levelPicker"></div>
<div id="game" style="display: none"></div>
</body>
</html>