-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_fullscreen.html
112 lines (105 loc) · 3.26 KB
/
game_fullscreen.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
<!DOCTYPE html>
<html>
<head>
<title>Missing Link</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" sizes="180x180" href="images/icon_blue.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/icon_blue.png">
<link rel="apple-touch-icon" sizes="167x167" href="images/icon_blue.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/icon_blue.png">
<link rel="icon" type="image/png" href="images/icon_blue.png">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="style.css">
<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/[email protected]/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 src="javascript/splashscreen.js"></script>
<script>
const MIN_WIDTH = 500;
const MAX_WIDTH = Math.min(1000, window.innerHeight - 250);
var game;
$(function() {
var levelPickerContainer = document.getElementById('levelPicker');
var gameContainer = document.getElementById('game');
var width = window.innerWidth;
var height = window.innerHeight;
game = new Game(gameContainer, width, height);
const levelPicker = new LevelPicker(levelPickerContainer, game, LEVEL_URLS);
drawSplashscreen();
});
window.addEventListener('resize', () => {
game.resize(window.innerWidth, window.innerHeight);
});
</script>
<!-- Uncomment this to debug touch input:
<script src="https://cdn.jsdelivr.net/gh/hammerjs/touchemulator@master/touch-emulator.js"></script>
<script>TouchEmulator();</script>
---->
<style>
body {
overflow: hidden;
touch-action: none;
}
svg.graph {
border: 0px;
border-radius: 0;
margin: 0;
padding: 0;
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
div.controls {
width: 100%;
margin: 0;
padding: 0;
position: absolute;
bottom: 0;
left: 0;
background: none;
border: none;
pointer-events: none;
box-shadow: none;
}
div.controls button {
pointer-events: auto;
}
div.controls #gameEasyMode {
pointer-events: auto;
}
div.levelTitle {
position: absolute;
pointer-events: none;
top: 25px;
left: 50%;
width: 80%;
transform: translate(-50%, 0);
z-index: 100;
text-shadow: 0px 0px 2px white;
}
</style>
</head>
<body class="fullscreen" style>
<div id="splashscreen">
<img src="images/titles/missing_link_black.jpg">
</div>
<div id="levelPicker">
<img src="images/titles/title9.jpg" class="missingLinkTitle">
</div>
<div id="game" style="display: none"></div>
</body>
</html>