Spaces:
Running
Running
Add 2 files
Browse files- README.md +6 -4
- index.html +554 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: datacatcher
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: blue
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,554 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Данные о пользователях - Темная тема</title>
|
| 7 |
+
<style>
|
| 8 |
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400;700&display=swap');
|
| 9 |
+
|
| 10 |
+
* {
|
| 11 |
+
margin: 0;
|
| 12 |
+
padding: 0;
|
| 13 |
+
box-sizing: border-box;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
font-family: 'Roboto', sans-serif;
|
| 18 |
+
overflow: hidden;
|
| 19 |
+
background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
|
| 20 |
+
color: #e6f7ff;
|
| 21 |
+
height: 100vh;
|
| 22 |
+
position: relative;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
#gameContainer {
|
| 26 |
+
position: relative;
|
| 27 |
+
width: 100%;
|
| 28 |
+
height: 100%;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Темный фон с тонкими звездами */
|
| 32 |
+
#chainBackground {
|
| 33 |
+
position: absolute;
|
| 34 |
+
top: 0;
|
| 35 |
+
left: 0;
|
| 36 |
+
width: 100%;
|
| 37 |
+
height: 100%;
|
| 38 |
+
background-image:
|
| 39 |
+
radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
|
| 40 |
+
radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px),
|
| 41 |
+
radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
|
| 42 |
+
background-size: 100px 100px, 150px 150px, 200px 200px;
|
| 43 |
+
z-index: 1;
|
| 44 |
+
pointer-events: none;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
#header {
|
| 48 |
+
position: absolute;
|
| 49 |
+
top: 0;
|
| 50 |
+
left: 0;
|
| 51 |
+
width: 100%;
|
| 52 |
+
padding: 10px;
|
| 53 |
+
background: linear-gradient(90deg, rgba(0, 40, 83, 0.9), rgba(9, 48, 90, 0.9));
|
| 54 |
+
z-index: 10;
|
| 55 |
+
text-align: center;
|
| 56 |
+
font-family: 'Orbitron', sans-serif;
|
| 57 |
+
border-bottom: 2px solid #1e88e5;
|
| 58 |
+
height: 80px;
|
| 59 |
+
color: white;
|
| 60 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
#header h1 {
|
| 64 |
+
text-shadow: 0 0 10px rgba(30, 136, 229, 0.7);
|
| 65 |
+
margin-bottom: 5px;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
#scoreBoard {
|
| 69 |
+
display: flex;
|
| 70 |
+
justify-content: space-around;
|
| 71 |
+
margin-top: 5px;
|
| 72 |
+
color: #e6f7ff;
|
| 73 |
+
font-size: 14px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.cube-source {
|
| 77 |
+
position: absolute;
|
| 78 |
+
top: 100px;
|
| 79 |
+
display: flex;
|
| 80 |
+
width: 100%;
|
| 81 |
+
justify-content: space-evenly;
|
| 82 |
+
z-index: 2;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.source-company {
|
| 86 |
+
width: 90px;
|
| 87 |
+
height: 30px;
|
| 88 |
+
display: flex;
|
| 89 |
+
align-items: center;
|
| 90 |
+
justify-content: center;
|
| 91 |
+
font-size: 10px;
|
| 92 |
+
font-weight: bold;
|
| 93 |
+
color: #fff;
|
| 94 |
+
background: linear-gradient(135deg, #1a237e, #283593);
|
| 95 |
+
border-radius: 5px;
|
| 96 |
+
border: 1px solid rgba(41, 98, 255, 0.3);
|
| 97 |
+
box-shadow: 0 2px 15px rgba(26, 35, 126, 0.4);
|
| 98 |
+
padding: 2px;
|
| 99 |
+
text-align: center;
|
| 100 |
+
transition: all 0.3s;
|
| 101 |
+
text-shadow: 0 1px 2px rgba(0,0,0,0.3);
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.source-company:hover {
|
| 105 |
+
transform: scale(1.1);
|
| 106 |
+
box-shadow: 0 0 15px rgba(63, 81, 181, 0.7);
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.falling-data {
|
| 110 |
+
position: absolute;
|
| 111 |
+
width: 30px;
|
| 112 |
+
height: 30px;
|
| 113 |
+
border-radius: 5px;
|
| 114 |
+
display: flex;
|
| 115 |
+
align-items: center;
|
| 116 |
+
justify-content: center;
|
| 117 |
+
font-size: 10px;
|
| 118 |
+
font-weight: bold;
|
| 119 |
+
color: white;
|
| 120 |
+
z-index: 3;
|
| 121 |
+
transition: background 0.3s;
|
| 122 |
+
top: 140px;
|
| 123 |
+
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
|
| 124 |
+
text-shadow: 0 1px 2px rgba(0,0,0,0.3);
|
| 125 |
+
border: 1px solid rgba(255,255,255,0.1);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
#platform {
|
| 129 |
+
position: absolute;
|
| 130 |
+
width: 120px;
|
| 131 |
+
height: 20px;
|
| 132 |
+
background: linear-gradient(90deg, #1e88e5, #64b5f6);
|
| 133 |
+
border-radius: 10px;
|
| 134 |
+
bottom: 30px;
|
| 135 |
+
left: 50%;
|
| 136 |
+
transform: translateX(-50%);
|
| 137 |
+
z-index: 5;
|
| 138 |
+
box-shadow: 0 4px 20px rgba(30, 136, 229, 0.5);
|
| 139 |
+
transition: all 0.5s;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
#platform::after {
|
| 143 |
+
content: 'DataNova';
|
| 144 |
+
position: absolute;
|
| 145 |
+
bottom: -20px;
|
| 146 |
+
left: 0;
|
| 147 |
+
width: 100%;
|
| 148 |
+
text-align: center;
|
| 149 |
+
font-size: 12px;
|
| 150 |
+
font-weight: bold;
|
| 151 |
+
color: #64b5f6;
|
| 152 |
+
text-shadow: 0 0 5px rgba(100, 181, 246, 0.7);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
#levelUpEffect {
|
| 156 |
+
position: absolute;
|
| 157 |
+
width: 0;
|
| 158 |
+
height: 0;
|
| 159 |
+
border-radius: 50%;
|
| 160 |
+
background: radial-gradient(circle, rgba(30,136,229,0.8) 0%, rgba(30,136,229,0) 70%);
|
| 161 |
+
z-index: 4;
|
| 162 |
+
pointer-events: none;
|
| 163 |
+
opacity: 0;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
#levelUpMessage {
|
| 167 |
+
position: absolute;
|
| 168 |
+
top: 50%;
|
| 169 |
+
left: 50%;
|
| 170 |
+
transform: translate(-50%, -50%);
|
| 171 |
+
font-size: 28px;
|
| 172 |
+
font-weight: bold;
|
| 173 |
+
color: #64b5f6;
|
| 174 |
+
opacity: 0;
|
| 175 |
+
z-index: 20;
|
| 176 |
+
pointer-events: none;
|
| 177 |
+
text-shadow: 0 0 10px rgba(100, 181, 246, 0.7);
|
| 178 |
+
font-family: 'Orbitron', sans-serif;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
#gameOver {
|
| 182 |
+
position: absolute;
|
| 183 |
+
top: 0;
|
| 184 |
+
left: 0;
|
| 185 |
+
width: 100%;
|
| 186 |
+
height: 100%;
|
| 187 |
+
background: radial-gradient(circle, rgba(0,40,83,0.95), rgba(9,48,90,0.95));
|
| 188 |
+
display: none;
|
| 189 |
+
flex-direction: column;
|
| 190 |
+
justify-content: center;
|
| 191 |
+
align-items: center;
|
| 192 |
+
z-index: 30;
|
| 193 |
+
color: white;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
#gameOver h2 {
|
| 197 |
+
font-size: 32px;
|
| 198 |
+
margin-bottom: 20px;
|
| 199 |
+
font-family: 'Orbitron', sans-serif;
|
| 200 |
+
text-shadow: 0 0 10px rgba(30, 136, 229, 0.7);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
#gameOver p {
|
| 204 |
+
font-size: 18px;
|
| 205 |
+
margin-bottom: 10px;
|
| 206 |
+
color: #bbdefb;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
#restartButton {
|
| 210 |
+
margin-top: 30px;
|
| 211 |
+
padding: 12px 25px;
|
| 212 |
+
background: linear-gradient(135deg, #1e88e5, #1976d2);
|
| 213 |
+
color: white;
|
| 214 |
+
border: none;
|
| 215 |
+
border-radius: 25px;
|
| 216 |
+
font-size: 18px;
|
| 217 |
+
cursor: pointer;
|
| 218 |
+
transition: all 0.3s;
|
| 219 |
+
box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
|
| 220 |
+
font-family: 'Orbitron', sans-serif;
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
#restartButton:hover {
|
| 224 |
+
transform: translateY(-3px);
|
| 225 |
+
box-shadow: 0 8px 20px rgba(30, 136, 229, 0.6);
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.particle {
|
| 229 |
+
position: absolute;
|
| 230 |
+
width: 6px;
|
| 231 |
+
height: 6px;
|
| 232 |
+
border-radius: 50%;
|
| 233 |
+
pointer-events: none;
|
| 234 |
+
z-index: 4;
|
| 235 |
+
box-shadow: 0 0 10px rgba(100, 181, 246, 0.8);
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
/* Эффект неонового свечения при наведении */
|
| 239 |
+
.source-company,
|
| 240 |
+
#restartButton,
|
| 241 |
+
#platform {
|
| 242 |
+
transition: all 0.3s ease;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
.source-company:hover,
|
| 246 |
+
#restartButton:hover {
|
| 247 |
+
filter: drop-shadow(0 0 5px currentColor);
|
| 248 |
+
}
|
| 249 |
+
</style>
|
| 250 |
+
</head>
|
| 251 |
+
<body>
|
| 252 |
+
<div id="gameContainer">
|
| 253 |
+
<div id="chainBackground"></div>
|
| 254 |
+
|
| 255 |
+
<div id="header">
|
| 256 |
+
<h1>Данные о пользователях</h1>
|
| 257 |
+
<div id="scoreBoard">
|
| 258 |
+
<div>Уровень: <span id="levelDisplay">1</span></div>
|
| 259 |
+
<div>Данные: <span id="scoreDisplay">0</span>/<span id="nextLevelDisplay">5</span></div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<div class="cube-source">
|
| 264 |
+
<div class="source-company">ГазпромБанк</div>
|
| 265 |
+
<div class="source-company">ГазпромНефть</div>
|
| 266 |
+
<div class="source-company">МРГ</div>
|
| 267 |
+
<div class="source-company">Premier</div>
|
| 268 |
+
<div class="source-company">Rutube</div>
|
| 269 |
+
<div class="source-company">Матч</div>
|
| 270 |
+
<div class="source-company">ГазпромБонус</div>
|
| 271 |
+
</div>
|
| 272 |
+
|
| 273 |
+
<div id="platform"></div>
|
| 274 |
+
<div id="levelUpEffect"></div>
|
| 275 |
+
<div id="levelUpMessage">Уровень повышен!</div>
|
| 276 |
+
|
| 277 |
+
<div id="gameOver">
|
| 278 |
+
<h2>Игра окончена!</h2>
|
| 279 |
+
<p>Вы достигли уровня: <span id="finalLevel">1</span></p>
|
| 280 |
+
<p>Всего собрано данных: <span id="finalScore">0</span></p>
|
| 281 |
+
<button id="restartButton">Играть снова</button>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<script>
|
| 286 |
+
// Game state
|
| 287 |
+
const state = {
|
| 288 |
+
score: 0,
|
| 289 |
+
level: 1,
|
| 290 |
+
nextLevelScore: 5,
|
| 291 |
+
gameOver: false,
|
| 292 |
+
companyColors: {
|
| 293 |
+
'ГазпромБанк': '#43a047',
|
| 294 |
+
'ГазпромНефть': '#1e88e5',
|
| 295 |
+
'МРГ': '#8e24aa',
|
| 296 |
+
'Premier': '#e53935',
|
| 297 |
+
'Rutube': '#fb8c00',
|
| 298 |
+
'Матч': '#00acc1',
|
| 299 |
+
'ГазпромБонус': '#fdd835'
|
| 300 |
+
},
|
| 301 |
+
platformSpeeds: {
|
| 302 |
+
1: 5,
|
| 303 |
+
2: 7,
|
| 304 |
+
3: 9,
|
| 305 |
+
4: 11,
|
| 306 |
+
5: 13,
|
| 307 |
+
6: 15,
|
| 308 |
+
7: 17
|
| 309 |
+
},
|
| 310 |
+
platformWidths: {
|
| 311 |
+
1: 120,
|
| 312 |
+
2: 140,
|
| 313 |
+
3: 160,
|
| 314 |
+
4: 180,
|
| 315 |
+
5: 200,
|
| 316 |
+
6: 220,
|
| 317 |
+
7: 240
|
| 318 |
+
},
|
| 319 |
+
platformColors: {
|
| 320 |
+
1: ['#1e88e5', '#64b5f6'],
|
| 321 |
+
2: ['#5c6bc0', '#9fa8da'],
|
| 322 |
+
3: ['#00897b', '#4db6ac'],
|
| 323 |
+
4: ['#ff8f00', '#ffb74d'],
|
| 324 |
+
5: ['#6a1b9a', '#ab47bc'],
|
| 325 |
+
6: ['#d32f2f', '#ef5350'],
|
| 326 |
+
7: ['#00838f', '#80deea']
|
| 327 |
+
}
|
| 328 |
+
};
|
| 329 |
+
|
| 330 |
+
// DOM elements
|
| 331 |
+
const gameContainer = document.getElementById('gameContainer');
|
| 332 |
+
const platform = document.getElementById('platform');
|
| 333 |
+
const scoreDisplay = document.getElementById('scoreDisplay');
|
| 334 |
+
const levelDisplay = document.getElementById('levelDisplay');
|
| 335 |
+
const nextLevelDisplay = document.getElementById('nextLevelDisplay');
|
| 336 |
+
const levelUpEffect = document.getElementById('levelUpEffect');
|
| 337 |
+
const levelUpMessage = document.getElementById('levelUpMessage');
|
| 338 |
+
const gameOverScreen = document.getElementById('gameOver');
|
| 339 |
+
const finalLevel = document.getElementById('finalLevel');
|
| 340 |
+
const finalScore = document.getElementById('finalScore');
|
| 341 |
+
const restartButton = document.getElementById('restartButton');
|
| 342 |
+
|
| 343 |
+
// Initialize game
|
| 344 |
+
function initGame() {
|
| 345 |
+
state.score = 0;
|
| 346 |
+
state.level = 1;
|
| 347 |
+
state.nextLevelScore = 5;
|
| 348 |
+
state.gameOver = false;
|
| 349 |
+
gameOverScreen.style.display = 'none';
|
| 350 |
+
|
| 351 |
+
updateScore();
|
| 352 |
+
|
| 353 |
+
document.querySelectorAll('.falling-data').forEach(el => el.remove());
|
| 354 |
+
updatePlatform();
|
| 355 |
+
|
| 356 |
+
if (state.gameLoop) {
|
| 357 |
+
clearInterval(state.gameLoop);
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
if (state.dataGenerator) {
|
| 361 |
+
clearInterval(state.dataGenerator);
|
| 362 |
+
}
|
| 363 |
+
state.dataGenerator = setInterval(generateData, 1500);
|
| 364 |
+
|
| 365 |
+
state.gameLoop = setInterval(updateGame, 16);
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
function generateData() {
|
| 369 |
+
if (state.gameOver) return;
|
| 370 |
+
|
| 371 |
+
const companies = Object.keys(state.companyColors);
|
| 372 |
+
const randomCompany = companies[Math.floor(Math.random() * companies.length)];
|
| 373 |
+
|
| 374 |
+
const dataCube = document.createElement('div');
|
| 375 |
+
dataCube.className = 'falling-data';
|
| 376 |
+
dataCube.textContent = randomCompany.substring(0, 3);
|
| 377 |
+
dataCube.style.backgroundColor = state.companyColors[randomCompany];
|
| 378 |
+
|
| 379 |
+
const maxLeft = gameContainer.clientWidth - 30;
|
| 380 |
+
const leftPos = Math.floor(Math.random() * maxLeft);
|
| 381 |
+
dataCube.style.left = `${leftPos}px`;
|
| 382 |
+
|
| 383 |
+
dataCube.dataset.company = randomCompany;
|
| 384 |
+
dataCube.dataset.speed = (2 + Math.random() * 2 + state.level * 0.5).toFixed(2);
|
| 385 |
+
|
| 386 |
+
gameContainer.appendChild(dataCube);
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
function updateGame() {
|
| 390 |
+
if (state.gameOver) return;
|
| 391 |
+
|
| 392 |
+
const dataCubes = document.querySelectorAll('.falling-data');
|
| 393 |
+
|
| 394 |
+
dataCubes.forEach(cube => {
|
| 395 |
+
const currentTop = parseFloat(cube.style.top) || 140;
|
| 396 |
+
const speed = parseFloat(cube.dataset.speed);
|
| 397 |
+
const newTop = currentTop + speed;
|
| 398 |
+
cube.style.top = `${newTop}px`;
|
| 399 |
+
|
| 400 |
+
if (checkCollision(cube)) {
|
| 401 |
+
handleDataCapture(cube);
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
if (newTop > gameContainer.clientHeight) {
|
| 405 |
+
handleMissedData(cube);
|
| 406 |
+
}
|
| 407 |
+
});
|
| 408 |
+
|
| 409 |
+
if (state.mouseX !== undefined) {
|
| 410 |
+
const containerRect = gameContainer.getBoundingClientRect();
|
| 411 |
+
let platformLeft = state.mouseX - containerRect.left - platform.clientWidth / 2;
|
| 412 |
+
platformLeft = Math.max(0, Math.min(platformLeft, containerRect.width - platform.clientWidth));
|
| 413 |
+
platform.style.left = `${platformLeft}px`;
|
| 414 |
+
}
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
function checkCollision(cube) {
|
| 418 |
+
const cubeRect = cube.getBoundingClientRect();
|
| 419 |
+
const platformRect = platform.getBoundingClientRect();
|
| 420 |
+
|
| 421 |
+
return cubeRect.bottom >= platformRect.top &&
|
| 422 |
+
cubeRect.right >= platformRect.left &&
|
| 423 |
+
cubeRect.left <= platformRect.right &&
|
| 424 |
+
cubeRect.top <= platformRect.bottom;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
function handleDataCapture(cube) {
|
| 428 |
+
state.score += 1;
|
| 429 |
+
updateScore();
|
| 430 |
+
createParticles(cube);
|
| 431 |
+
|
| 432 |
+
if (state.score >= state.nextLevelScore) {
|
| 433 |
+
levelUp();
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
cube.remove();
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
function handleMissedData(cube) {
|
| 440 |
+
cube.remove();
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
function updateScore() {
|
| 444 |
+
scoreDisplay.textContent = state.score;
|
| 445 |
+
levelDisplay.textContent = state.level;
|
| 446 |
+
nextLevelDisplay.textContent = state.nextLevelScore;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
function levelUp() {
|
| 450 |
+
state.level += 1;
|
| 451 |
+
// Установка новых значений для получения следующего уровня: 5, 10, 15 и т.д.
|
| 452 |
+
state.nextLevelScore = state.level * 5;
|
| 453 |
+
updatePlatform();
|
| 454 |
+
showLevelUpEffect();
|
| 455 |
+
updateScore();
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
function updatePlatform() {
|
| 459 |
+
platform.style.width = `${state.platformWidths[Math.min(state.level, 7)]}px`;
|
| 460 |
+
platform.style.background = `linear-gradient(90deg, ${state.platformColors[Math.min(state.level, 7)][0]}, ${state.platformColors[Math.min(state.level, 7)][1]})`;
|
| 461 |
+
platform.style.boxShadow = `0 4px 20px ${state.platformColors[Math.min(state.level, 7)][0]}80`;
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
function showLevelUpEffect() {
|
| 465 |
+
const platformRect = platform.getBoundingClientRect();
|
| 466 |
+
|
| 467 |
+
levelUpEffect.style.left = `${platformRect.left}px`;
|
| 468 |
+
levelUpEffect.style.top = `${platformRect.top}px`;
|
| 469 |
+
levelUpEffect.style.width = `${platformRect.width * 2}px`;
|
| 470 |
+
levelUpEffect.style.height = `${platformRect.height * 10}px`;
|
| 471 |
+
levelUpEffect.style.opacity = '1';
|
| 472 |
+
levelUpEffect.style.transform = 'translate(-50%, -50%)';
|
| 473 |
+
levelUpEffect.style.background = `radial-gradient(circle, ${state.platformColors[Math.min(state.level, 7)][0]}80 0%, ${state.platformColors[Math.min(state.level, 7)][0]}00 70%)`;
|
| 474 |
+
|
| 475 |
+
levelUpMessage.style.opacity = '1';
|
| 476 |
+
levelUpMessage.style.color = state.platformColors[Math.min(state.level, 7)][1];
|
| 477 |
+
levelUpMessage.style.textShadow = `0 0 15px ${state.platformColors[Math.min(state.level, 7)][1]}`;
|
| 478 |
+
|
| 479 |
+
setTimeout(() => {
|
| 480 |
+
levelUpEffect.style.transition = 'all 0.5s ease-out';
|
| 481 |
+
levelUpEffect.style.opacity = '0';
|
| 482 |
+
levelUpEffect.style.width = '0';
|
| 483 |
+
levelUpEffect.style.height = '0';
|
| 484 |
+
|
| 485 |
+
levelUpMessage.style.transition = 'opacity 0.5s ease-out';
|
| 486 |
+
levelUpMessage.style.opacity = '0';
|
| 487 |
+
|
| 488 |
+
setTimeout(() => {
|
| 489 |
+
levelUpEffect.style.transition = 'none';
|
| 490 |
+
levelUpMessage.style.transition = 'none';
|
| 491 |
+
}, 500);
|
| 492 |
+
}, 1000);
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
function createParticles(cube) {
|
| 496 |
+
const cubeRect = cube.getBoundingClientRect();
|
| 497 |
+
const color = cube.style.backgroundColor;
|
| 498 |
+
|
| 499 |
+
for (let i = 0; i < 15; i++) {
|
| 500 |
+
const particle = document.createElement('div');
|
| 501 |
+
particle.className = 'particle';
|
| 502 |
+
particle.style.backgroundColor = color;
|
| 503 |
+
particle.style.left = `${cubeRect.left + cubeRect.width / 2}px`;
|
| 504 |
+
particle.style.top = `${cubeRect.top + cubeRect.height / 2}px`;
|
| 505 |
+
particle.style.boxShadow = `0 0 15px ${color}`;
|
| 506 |
+
document.body.appendChild(particle);
|
| 507 |
+
|
| 508 |
+
const angle = Math.random() * Math.PI * 2;
|
| 509 |
+
const speed = 2 + Math.random() * 3;
|
| 510 |
+
const vx = Math.cos(angle) * speed;
|
| 511 |
+
const vy = Math.sin(angle) * speed;
|
| 512 |
+
|
| 513 |
+
let posX = cubeRect.left + cubeRect.width / 2;
|
| 514 |
+
let posY = cubeRect.top + cubeRect.height / 2;
|
| 515 |
+
|
| 516 |
+
const animateParticle = () => {
|
| 517 |
+
posX += vx;
|
| 518 |
+
posY += vy;
|
| 519 |
+
particle.style.left = `${posX}px`;
|
| 520 |
+
particle.style.top = `${posY}px`;
|
| 521 |
+
particle.style.opacity = parseFloat(particle.style.opacity || 1) - 0.02;
|
| 522 |
+
|
| 523 |
+
if (parseFloat(particle.style.opacity || 1) > 0) {
|
| 524 |
+
requestAnimationFrame(animateParticle);
|
| 525 |
+
} else {
|
| 526 |
+
particle.remove();
|
| 527 |
+
}
|
| 528 |
+
};
|
| 529 |
+
|
| 530 |
+
requestAnimationFrame(animateParticle);
|
| 531 |
+
}
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
function gameOver() {
|
| 535 |
+
state.gameOver = true;
|
| 536 |
+
clearInterval(state.gameLoop);
|
| 537 |
+
clearInterval(state.dataGenerator);
|
| 538 |
+
|
| 539 |
+
finalLevel.textContent = state.level;
|
| 540 |
+
finalScore.textContent = state.score;
|
| 541 |
+
gameOverScreen.style.display = 'flex';
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
function handleMouseMove(e) {
|
| 545 |
+
state.mouseX = e.clientX;
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
gameContainer.addEventListener('mousemove', handleMouseMove);
|
| 549 |
+
restartButton.addEventListener('click', initGame);
|
| 550 |
+
|
| 551 |
+
initGame();
|
| 552 |
+
</script>
|
| 553 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">This website has been generated by <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
|
| 554 |
+
</html>
|