-
Notifications
You must be signed in to change notification settings - Fork 1
/
armaloadingscreen.html
176 lines (155 loc) · 5.93 KB
/
armaloadingscreen.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html>
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Orbitron&display=swap" rel="stylesheet">
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; position: relative; }
.timeend { font-size: 54px !important; }
.timeflash {
animation: shake 0.82s infinite cubic-bezier(.36,.07,.19,.97) both;
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
font-size: 70px !important;
left: -35px !important;
}
#flash {
margin-top: 0px;
height: 1080px;
width: 1920px;
position: absolute;
}
.active {
-webkit-animation-name: demo;
-webkit-animation-duration: 500ms;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
-moz-animation-name: demo;
-moz-animation-duration: 500ms;
-moz-animation-iteration-count: 1;
-moz-animation-timing-function: linear;
}
#time {
color: black;
opacity: 0.6;
font-size: 80px;
font-family: 'Orbitron', sans-serif;
position: absolute;
top: 70px;
left: 0;
width: 336px;
text-align: center;
z-index: 99;
margin: 0;
}
.waiting_loop {
position: absolute;
}
.digit {
position: absolute;
top: 0px; left: 0px;
}
@-webkit-keyframes demo {
0% {
background-color: White;
opacity:1;
}
22% {
background-color: White;
}
77% {
background-color: White;
}
100% {
background-color: #FFFFFF;
}
}
@keyframes shake {
10%, 90% {
transform: translate3d(-1px, 1px, 0);
}
20%, 80% {
transform: translate3d(2px, -2px, 0);
}
30%, 50%, 70% {
transform: translate3d(-4px, 4px, 0) scale(1.05);
}
40%, 60% {
transform: translate3d(4px, -4px, 0);
}
}
</style>
</head>
<body>
<div id="flash"></div>
<div class="waiting_loop">
<p id="time"></p>
<video id="Video_loop" class="digit" playsinline autoplay muted loop src="https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_BASE.webm" type="video/webm">
</div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
const params = new URLSearchParams(document.location.search);
let debug = parseInt(params.get('debug'), 10) || 0;
video_choix(debug);
const timer = parseInt(params.get('timer'), 10) || -1;
const utc = parseInt(params.get('utc'), 10) || 1;
const fuseau = 11 + utc;
const countDownDate = new Date(`Nov 27, 2021 ${fuseau}:00:00`).getTime();
if (timer == -1) {
initialize_time(countDownDate);
} else {
initialize_time(new Date().getTime() + (timer * 1000 * 60));
}
});
function flash() {
$('#flash').addClass('active');
}
function video_choix(debug = 0) {
var vid_select = new Array()
vid_select[1]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_BASE.webm';
vid_select[2]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_PLANET.webm';
vid_select[3]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_SOLEIL2.webm';
vid_select[4]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_VAISSEAU.webm';
vid_select[5]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_ASTEROIDV2.webm';
vid_select[6]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_BASE.webm';
vid_select[7]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_PLANET.webm';
vid_select[8]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_SOLEIL2.webm';
vid_select[9]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_VAISSEAU.webm';
vid_select[10]='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_ASTEROIDV2.webm';
var number = Math.floor(Math.random() * (10 - 1)) + 1;
$('#time').removeClass('timeflash');
document.getElementById("Video_loop").setAttribute("src", vid_select[number]);
setTimeout('flash()', 5900);
setTimeout(`video_speed(${debug})`, debug ? 6000 : 1000 * 5 * 60);
}
function video_speed(debug = 0) {
var speed='https://tacxtv.github.io/armadesdons/data/Waiting_Arma2021_HYPER.webm';
document.getElementById("Video_loop").setAttribute("src", speed);
$('#time').addClass('timeflash');
setTimeout(`video_choix(${debug})`, 5200);
}
function initialize_time(distance) {
var display = document.querySelector('#time');
startTimer(distance, display);
}
function startTimer(countDownDate, display) {
setInterval(function () {
const now = new Date().getTime();
const distance = countDownDate - now;
let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
if (minutes < 10) minutes = `0${minutes}`;
let seconds = Math.floor((distance % (1000 * 60)) / 1000);
if (seconds < 10) seconds = `0${seconds}`;
if (distance <= 0) {
$('#time').addClass('timeend');
display.textContent = 'STARTING SOON';
} else {
display.textContent = minutes + ":" + seconds;
}
}, 1000);
}
</script>
</body>
</html>