forked from loglot-dev/YA2P-FINAL-Beta
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
103 lines (88 loc) · 2.71 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
<!DOCTYPE html>
<link rel="icon" type="image/x-icon"
href="https://raw.githubusercontent.com/loglot/Yet-Another-Collectathon/main/logo.ico">
<title>Yet Another 2d Platformer</title>
<style>
* {
padding: 0;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
canvas {
background: #5555ff;
display: block;
margin: 0 auto;
}
#timer-container, #timer-container * {
display: block !important;
position: fixed !important;
left: 50% !important;
transform: translateX(-50%) !important;
z-index: 1000 !important;
top: -220px;
background-color: rgba(255, 255, 255, 0.0) !important;
padding: 10px !important;
border-radius: 5px !important;
text-align: center !important;
margin-top: 0 !important;
pointer-events: none;
user-select: none;
}
#timer {
font-size: 2em !important;
color: white;
pointer-events: none;
user-select: none;
}
</style>
<div id="timer-container">
<div id="timer">00:00:00</div>
</div>
<body style="background-color:rgb(0, 0, 0);"></body>
<script src="./system/variousParts/stopTimer.js"></script>
<script src="./system/variousParts/startTimer.js"></script>
<!----> <canvas id="game_screen" width="2514" height="1377">
This Game Requires The HTML5 Canvas, And Javascript To Function
</canvas> <!---->
<canvas id="balls" width="2514" height="1377"></canvas>
<div class = "a">
<canvas id="PostProcessing" width="2514" height="1377"></canvas>
</div>
<canvas id="UI" width="2514" height="1377"></canvas>
<style>
#balls {
background: rgba(0, 0, 0, 0);
display: block;
margin: 0 auto;
}
#PostProcessing {
background: rgba(0, 0, 0, 0);
display: block;
margin: 0 auto;
}
#UI {
background: rgba(0, 0, 0, 0);
display: block;
margin: 0 auto;
}
.a {
display: block;
filter: blur(30px)
}
</style>
<script>
function adjustTimerPosition() {
const timerContainer = document.getElementById('timer-container');
const screenHeight = window.innerHeight;
const timerHeight = timerContainer.offsetHeight;
const topPosition = (screenHeight * 0.5) - (0.96 * screenHeight) + 220;
timerContainer.style.top = `${topPosition}px`;
console.log(timerContainer.style.top);
}
window.addEventListener('resize', adjustTimerPosition);
window.addEventListener('load', adjustTimerPosition);
</script>
<script type="module" src="main.js"></script>