Spaces:
Running
Running
Add 2 files
Browse files- README.md +6 -4
- index.html +1364 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
-
colorTo:
|
| 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: neon-pit-dpsk
|
| 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,1364 @@
|
|
| 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="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NEON PIT</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&family=Orbitron:wght@600&display=swap" rel="stylesheet">
|
| 8 |
+
<style>
|
| 9 |
+
/* Глобальные стили */
|
| 10 |
+
* {
|
| 11 |
+
margin: 0;
|
| 12 |
+
padding: 0;
|
| 13 |
+
box-sizing: border-box;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
background-color: #000000;
|
| 18 |
+
color: #00f5ff;
|
| 19 |
+
font-family: 'Rajdhani', sans-serif;
|
| 20 |
+
overflow-x: hidden;
|
| 21 |
+
position: relative;
|
| 22 |
+
min-height: 100vh;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* Шапка */
|
| 26 |
+
header {
|
| 27 |
+
padding: 20px;
|
| 28 |
+
text-align: center;
|
| 29 |
+
border-bottom: 1px solid #00f5ff;
|
| 30 |
+
background: rgba(0, 0, 0, 0.8);
|
| 31 |
+
position: relative;
|
| 32 |
+
z-index: 10;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
h1 {
|
| 36 |
+
font-size: 3rem;
|
| 37 |
+
letter-spacing: 3px;
|
| 38 |
+
text-transform: uppercase;
|
| 39 |
+
text-shadow: 0 0 10px #00f5ff;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/* Основной контент */
|
| 43 |
+
main {
|
| 44 |
+
display: grid;
|
| 45 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 46 |
+
gap: 20px;
|
| 47 |
+
padding: 20px;
|
| 48 |
+
max-width: 1200px;
|
| 49 |
+
margin: 0 auto;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.section {
|
| 53 |
+
background: rgba(0, 0, 0, 0.7);
|
| 54 |
+
border: 2px solid #00f5ff;
|
| 55 |
+
border-radius: 5px;
|
| 56 |
+
padding: 15px;
|
| 57 |
+
transition: all 0.3s ease;
|
| 58 |
+
cursor: pointer;
|
| 59 |
+
height: 100%;
|
| 60 |
+
position: relative;
|
| 61 |
+
overflow: hidden;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.section:hover {
|
| 65 |
+
border-color: #00ffc8;
|
| 66 |
+
box-shadow: 0 0 15px #00f5ff;
|
| 67 |
+
transform: translateY(-5px);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.section::before {
|
| 71 |
+
content: '';
|
| 72 |
+
position: absolute;
|
| 73 |
+
top: 0;
|
| 74 |
+
left: 0;
|
| 75 |
+
width: 100%;
|
| 76 |
+
height: 100%;
|
| 77 |
+
background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, transparent 100%);
|
| 78 |
+
z-index: -1;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
h2 {
|
| 82 |
+
font-size: 1.5rem;
|
| 83 |
+
margin-bottom: 15px;
|
| 84 |
+
color: #00f5ff;
|
| 85 |
+
text-shadow: 0 0 5px #00f5ff;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
p {
|
| 89 |
+
margin-bottom: 15px;
|
| 90 |
+
line-height: 1.5;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/* Арт генератор */
|
| 94 |
+
.art-container {
|
| 95 |
+
width: 100%;
|
| 96 |
+
height: 200px;
|
| 97 |
+
background: #111;
|
| 98 |
+
margin: 10px 0;
|
| 99 |
+
position: relative;
|
| 100 |
+
overflow: hidden;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
#artCanvas {
|
| 104 |
+
width: 100%;
|
| 105 |
+
height: 100%;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* Змейка и динозаврик */
|
| 109 |
+
.game-container {
|
| 110 |
+
width: 100%;
|
| 111 |
+
height: 200px;
|
| 112 |
+
background: #111;
|
| 113 |
+
margin: 10px 0;
|
| 114 |
+
position: relative;
|
| 115 |
+
border: 1px solid #00f5ff;
|
| 116 |
+
display: flex;
|
| 117 |
+
justify-content: center;
|
| 118 |
+
align-items: center;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
/* Кнопки */
|
| 122 |
+
.btn {
|
| 123 |
+
background: transparent;
|
| 124 |
+
border: 1px solid #00f5ff;
|
| 125 |
+
color: #00f5ff;
|
| 126 |
+
padding: 8px 15px;
|
| 127 |
+
font-family: 'Rajdhani', sans-serif;
|
| 128 |
+
font-weight: bold;
|
| 129 |
+
cursor: pointer;
|
| 130 |
+
transition: all 0.3s ease;
|
| 131 |
+
text-transform: uppercase;
|
| 132 |
+
letter-spacing: 1px;
|
| 133 |
+
margin-right: 10px;
|
| 134 |
+
margin-bottom: 10px;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.btn:hover {
|
| 138 |
+
background: #00f5ff;
|
| 139 |
+
color: #000;
|
| 140 |
+
box-shadow: 0 0 10px #00f5ff;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
/* FunPay кнопка */
|
| 144 |
+
.funpay-btn {
|
| 145 |
+
display: block;
|
| 146 |
+
width: 100%;
|
| 147 |
+
padding: 15px;
|
| 148 |
+
margin: 20px auto;
|
| 149 |
+
max-width: 500px;
|
| 150 |
+
background: transparent;
|
| 151 |
+
border: 2px solid #00f5ff;
|
| 152 |
+
color: #00f5ff;
|
| 153 |
+
font-family: 'Orbitron', sans-serif;
|
| 154 |
+
font-size: 1.2rem;
|
| 155 |
+
text-align: center;
|
| 156 |
+
text-transform: uppercase;
|
| 157 |
+
cursor: pointer;
|
| 158 |
+
transition: all 0.3s ease;
|
| 159 |
+
position: relative;
|
| 160 |
+
overflow: hidden;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.funpay-btn::before {
|
| 164 |
+
content: '';
|
| 165 |
+
position: absolute;
|
| 166 |
+
top: 0;
|
| 167 |
+
left: -100%;
|
| 168 |
+
width: 100%;
|
| 169 |
+
height: 100%;
|
| 170 |
+
background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.4), transparent);
|
| 171 |
+
transition: all 0.5s ease;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.funpay-btn:hover {
|
| 175 |
+
background: rgba(0, 245, 255, 0.2);
|
| 176 |
+
box-shadow: 0 0 20px #00f5ff;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.funpay-btn:hover::before {
|
| 180 |
+
left: 100%;
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
/* Футер */
|
| 184 |
+
footer {
|
| 185 |
+
text-align: center;
|
| 186 |
+
padding: 20px;
|
| 187 |
+
border-top: 1px solid #00f5ff;
|
| 188 |
+
margin-top: 30px;
|
| 189 |
+
position: relative;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.hex-code {
|
| 193 |
+
font-family: 'Orbitron', sans-serif;
|
| 194 |
+
font-size: 1.2rem;
|
| 195 |
+
animation: blink 1.5s infinite;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
@keyframes blink {
|
| 199 |
+
0% { opacity: 0.3; }
|
| 200 |
+
50% { opacity: 1; text-shadow: 0 0 10px #00f5ff; }
|
| 201 |
+
100% { opacity: 0.3; }
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
/* Эффекты */
|
| 205 |
+
.blue-screen {
|
| 206 |
+
position: fixed;
|
| 207 |
+
top: 0;
|
| 208 |
+
left: 0;
|
| 209 |
+
width: 100%;
|
| 210 |
+
height: 100%;
|
| 211 |
+
background: #00f5ff;
|
| 212 |
+
z-index: 100;
|
| 213 |
+
display: flex;
|
| 214 |
+
justify-content: center;
|
| 215 |
+
align-items: center;
|
| 216 |
+
color: #000;
|
| 217 |
+
font-size: 2rem;
|
| 218 |
+
text-align: center;
|
| 219 |
+
font-family: 'Orbitron', sans-serif;
|
| 220 |
+
opacity: 0;
|
| 221 |
+
pointer-events: none;
|
| 222 |
+
transition: opacity 0.5s ease;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
/* Модальное окно для мини-игр */
|
| 226 |
+
.game-modal {
|
| 227 |
+
position: fixed;
|
| 228 |
+
top: 0;
|
| 229 |
+
left: 0;
|
| 230 |
+
width: 100%;
|
| 231 |
+
height: 100%;
|
| 232 |
+
background: rgba(0, 0, 0, 0.9);
|
| 233 |
+
z-index: 50;
|
| 234 |
+
display: flex;
|
| 235 |
+
justify-content: center;
|
| 236 |
+
align-items: center;
|
| 237 |
+
opacity: 0;
|
| 238 |
+
pointer-events: none;
|
| 239 |
+
transition: opacity 0.3s ease;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.game-modal.active {
|
| 243 |
+
opacity: 1;
|
| 244 |
+
pointer-events: all;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
.game-content {
|
| 248 |
+
background: #000;
|
| 249 |
+
border: 2px solid #00f5ff;
|
| 250 |
+
padding: 20px;
|
| 251 |
+
max-width: 800px;
|
| 252 |
+
width: 90%;
|
| 253 |
+
position: relative;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.close-btn {
|
| 257 |
+
position: absolute;
|
| 258 |
+
top: 10px;
|
| 259 |
+
right: 10px;
|
| 260 |
+
background: transparent;
|
| 261 |
+
border: none;
|
| 262 |
+
color: #00f5ff;
|
| 263 |
+
font-size: 1.5rem;
|
| 264 |
+
cursor: pointer;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
/* Стили для змейки */
|
| 268 |
+
#snakeCanvas {
|
| 269 |
+
background: #000;
|
| 270 |
+
border: 1px solid #00f5ff;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
/* Стили для динозаврика */
|
| 274 |
+
#dinoCanvas {
|
| 275 |
+
background: #000;
|
| 276 |
+
border: 1px solid #00f5ff;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
/* Стили для вирусов */
|
| 280 |
+
#virusGameCanvas {
|
| 281 |
+
background: #000;
|
| 282 |
+
border: 1px solid #f50000;
|
| 283 |
+
}
|
| 284 |
+
</style>
|
| 285 |
+
</head>
|
| 286 |
+
<body>
|
| 287 |
+
<header>
|
| 288 |
+
<h1>NEON PIT</h1>
|
| 289 |
+
</header>
|
| 290 |
+
|
| 291 |
+
<main>
|
| 292 |
+
<section class="section" id="art-generator">
|
| 293 |
+
<h2>NEON ART GENERATOR</h2>
|
| 294 |
+
<p>Создайте уникальный цифровой арт с неоновыми эффектами. Настройте параметры генерации:</p>
|
| 295 |
+
|
| 296 |
+
<div class="art-container">
|
| 297 |
+
<canvas id="artCanvas"></canvas>
|
| 298 |
+
</div>
|
| 299 |
+
|
| 300 |
+
<div>
|
| 301 |
+
<button class="btn" id="generateBtn">GENERATE</button>
|
| 302 |
+
<button class="btn" id="exportBtn">SHOCK EXPORT</button>
|
| 303 |
+
</div>
|
| 304 |
+
|
| 305 |
+
<div style="margin-top: 15px;">
|
| 306 |
+
<label for="glitchLevel">GLITCH LEVEL:</label>
|
| 307 |
+
<input type="range" id="glitchLevel" min="0" max="10" value="3">
|
| 308 |
+
|
| 309 |
+
<label for="colorBleed">COLOR BLEED:</label>
|
| 310 |
+
<input type="range" id="colorBleed" min="0" max="10" value="5">
|
| 311 |
+
|
| 312 |
+
<label for="scanlines">SCANLINES:</label>
|
| 313 |
+
<input type="range" id="scanlines" min="0" max="10" value="2">
|
| 314 |
+
</div>
|
| 315 |
+
</section>
|
| 316 |
+
|
| 317 |
+
<section class="section" id="cyber-snake">
|
| 318 |
+
<h2>CYBER SNAKE</h2>
|
| 319 |
+
<p>Классическая змейка с кибер-твистом: при 10+ очках управление инвертируется, а на поле появляются вирусы!</p>
|
| 320 |
+
|
| 321 |
+
<div class="game-container">
|
| 322 |
+
<canvas id="snakeCanvas" width="280" height="180"></canvas>
|
| 323 |
+
</div>
|
| 324 |
+
|
| 325 |
+
<button class="btn" id="playSnakeBtn">START GAME</button>
|
| 326 |
+
<span id="snakeScore" style="font-family: 'Orbitron', sans-serif;">SCORE: 0</span>
|
| 327 |
+
</section>
|
| 328 |
+
|
| 329 |
+
<section class="section" id="trex-apocalypse">
|
| 330 |
+
<h2>T-REX APOCALYPSE</h2>
|
| 331 |
+
<p>Динозаврик из Chrome, но с неоновой тематикой. Попробуйте заработать 1000 очков - вас ждёт сюрприз!</p>
|
| 332 |
+
|
| 333 |
+
<div class="game-container">
|
| 334 |
+
<canvas id="dinoCanvas" width="300" height="150"></canvas>
|
| 335 |
+
</div>
|
| 336 |
+
|
| 337 |
+
<button class="btn" id="playDinoBtn">START GAME</button>
|
| 338 |
+
<span id="dinoScore" style="font-family: 'Orbitron', sans-serif;">SCORE: 0</span>
|
| 339 |
+
</section>
|
| 340 |
+
|
| 341 |
+
<section class="section" id="funpay-section">
|
| 342 |
+
<h2>EMERGENCY FUNPAY PORTAL</h2>
|
| 343 |
+
<p>Нажмите кнопку для активации чрезвычайного портала прямо в FunPay. Будьте готовы к кибер-переходу!</p>
|
| 344 |
+
|
| 345 |
+
<button class="btn funpay-btn" id="funpayBtn">ACTIVATE FUNPAY PORTAL</button>
|
| 346 |
+
|
| 347 |
+
<p>⚠️ Система переведёт вас через 2 секунды после активации. Отменить невозможно.</p>
|
| 348 |
+
</section>
|
| 349 |
+
</main>
|
| 350 |
+
|
| 351 |
+
<footer>
|
| 352 |
+
<div class="hex-code">#0xDEAD</div>
|
| 353 |
+
<p>CYBER SYSTEMS ONLINE</p>
|
| 354 |
+
</footer>
|
| 355 |
+
|
| 356 |
+
<!-- Синий экран смерти -->
|
| 357 |
+
<div class="blue-screen" id="blueScreen">
|
| 358 |
+
<div>
|
| 359 |
+
<p>CRITICAL SYSTEM ERROR</p>
|
| 360 |
+
<p>REBOOTING...</p>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
|
| 364 |
+
<!-- Модальное окно для игр -->
|
| 365 |
+
<div class="game-modal" id="snakeModal">
|
| 366 |
+
<div class="game-content">
|
| 367 |
+
<button class="close-btn" id="closeSnakeBtn">×</button>
|
| 368 |
+
<h2>CYBER SNAKE</h2>
|
| 369 |
+
<p>Управление: стрелки. При 10+ очках всё становится сложнее!</p>
|
| 370 |
+
<canvas id="bigSnakeCanvas" width="600" height="400"></canvas>
|
| 371 |
+
<p id="bigSnakeScore" style="font-family: 'Orbitron', sans-serif; text-align: center; font-size: 1.5rem; margin-top: 10px;">SCORE: 0</p>
|
| 372 |
+
</div>
|
| 373 |
+
</div>
|
| 374 |
+
|
| 375 |
+
<div class="game-modal" id="dinoModal">
|
| 376 |
+
<div class="game-content">
|
| 377 |
+
<button class="close-btn" id="closeDinoBtn">×</button>
|
| 378 |
+
<h2>T-REX APOCALYPSE</h2>
|
| 379 |
+
<p>Управление: пробел для прыжка. Наберите 1000 очков для активации апокалипсиса!</p>
|
| 380 |
+
<canvas id="bigDinoCanvas" width="600" height="200"></canvas>
|
| 381 |
+
<p id="bigDinoScore" style="font-family: 'Orbitron', sans-serif; text-align: center; font-size: 1.5rem; margin-top: 10px;">SCORE: 0</p>
|
| 382 |
+
</div>
|
| 383 |
+
</div>
|
| 384 |
+
|
| 385 |
+
<!-- Мини-игра "Убей вирус" -->
|
| 386 |
+
<div class="game-modal" id="virusModal">
|
| 387 |
+
<div class="game-content">
|
| 388 |
+
<button class="close-btn" id="closeVirusBtn">×</button>
|
| 389 |
+
<h2 style="color: #ff0000;">VIRUS TERMINATION</h2>
|
| 390 |
+
<p>Нажимайте на появляющиеся вирусы, чтобы уничтожить их!</p>
|
| 391 |
+
<canvas id="virusGameCanvas" width="600" height="400"></canvas>
|
| 392 |
+
<p id="virusScore" style="font-family: 'Orbitron', sans-serif; text-align: center; font-size: 1.5rem; margin-top: 10px; color: #ff0000;">DESTROYED: 0</p>
|
| 393 |
+
<p id="virusTime" style="text-align: center;">TIME LEFT: 30</p>
|
| 394 |
+
</div>
|
| 395 |
+
</div>
|
| 396 |
+
|
| 397 |
+
<script>
|
| 398 |
+
// Генератор артов
|
| 399 |
+
const artCanvas = document.getElementById('artCanvas');
|
| 400 |
+
const ctx = artCanvas.getContext('2d');
|
| 401 |
+
artCanvas.width = artCanvas.offsetWidth;
|
| 402 |
+
artCanvas.height = artCanvas.offsetHeight;
|
| 403 |
+
|
| 404 |
+
function generateArt() {
|
| 405 |
+
const width = artCanvas.width;
|
| 406 |
+
const height = artCanvas.height;
|
| 407 |
+
const glitchLevel = parseInt(document.getElementById('glitchLevel').value);
|
| 408 |
+
const colorBleed = parseInt(document.getElementById('colorBleed').value);
|
| 409 |
+
const scanlines = parseInt(document.getElementById('scanlines').value);
|
| 410 |
+
|
| 411 |
+
ctx.clearRect(0, 0, width, height);
|
| 412 |
+
|
| 413 |
+
// Создаем базовую текстуру
|
| 414 |
+
for(let x = 0; x < width; x += 10) {
|
| 415 |
+
for(let y = 0; y < height; y += 10) {
|
| 416 |
+
const r = Math.floor(Math.random() * 255);
|
| 417 |
+
const g = Math.floor(Math.random() * (225 - 200) + 200);
|
| 418 |
+
const b = Math.floor(Math.random() * (255 - 220) + 220);
|
| 419 |
+
ctx.fillStyle = `rgb(${r}, ${g}, ${b})`;
|
| 420 |
+
ctx.fillRect(x, y, 10, 10);
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
// Добавляем эффекты
|
| 425 |
+
if (glitchLevel > 0) {
|
| 426 |
+
applyGlitch(glitchLevel);
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
if (colorBleed > 0) {
|
| 430 |
+
applyColorBleed(colorBleed);
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
if (scanlines > 0) {
|
| 434 |
+
applyScanlines(scanlines);
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
// Добавляем водяной знак
|
| 438 |
+
ctx.font = 'bold 20px Orbitron';
|
| 439 |
+
ctx.fillStyle = 'rgba(0, 245, 255, 0.2)';
|
| 440 |
+
ctx.textAlign = 'right';
|
| 441 |
+
ctx.textBaseline = 'bottom';
|
| 442 |
+
ctx.fillText('NEON PIT', width - 10, height - 10);
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
function applyGlitch(level) {
|
| 446 |
+
const width = artCanvas.width;
|
| 447 |
+
const height = artCanvas.height;
|
| 448 |
+
const imageData = ctx.getImageData(0, 0, width, height);
|
| 449 |
+
const data = imageData.data;
|
| 450 |
+
|
| 451 |
+
for (let i = 0; i < data.length; i += 4) {
|
| 452 |
+
if (Math.random() < level/20) {
|
| 453 |
+
data[i] = 0; // R
|
| 454 |
+
data[i + 1] = 255; // G
|
| 455 |
+
data[i + 2] = 255; // B
|
| 456 |
+
}
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
ctx.putImageData(imageData, 0, 0);
|
| 460 |
+
}
|
| 461 |
+
|
| 462 |
+
function applyColorBleed(level) {
|
| 463 |
+
const width = artCanvas.width;
|
| 464 |
+
const height = artCanvas.height;
|
| 465 |
+
|
| 466 |
+
for(let i = 0; i < level; i++) {
|
| 467 |
+
const x = Math.floor(Math.random() * (width - 10));
|
| 468 |
+
const y = Math.floor(Math.random() * (height - 10));
|
| 469 |
+
|
| 470 |
+
const r = Math.floor(Math.random() * 255);
|
| 471 |
+
const g = Math.floor(Math.random() * (225 - 200) + 200);
|
| 472 |
+
const b = Math.floor(Math.random() * (255 - 220) + 220);
|
| 473 |
+
|
| 474 |
+
ctx.fillStyle = `rgba(${r}, ${g}, ${b}, 0.3)`;
|
| 475 |
+
ctx.globalCompositeOperation = 'lighten';
|
| 476 |
+
ctx.beginPath();
|
| 477 |
+
ctx.arc(x, y, level * 5, 0, Math.PI * 2);
|
| 478 |
+
ctx.fill();
|
| 479 |
+
ctx.globalCompositeOperation = 'source-over';
|
| 480 |
+
}
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
function applyScanlines(level) {
|
| 484 |
+
const width = artCanvas.width;
|
| 485 |
+
const height = artCanvas.height;
|
| 486 |
+
|
| 487 |
+
ctx.strokeStyle = `rgba(0, 245, 255, ${level/30})`;
|
| 488 |
+
ctx.lineWidth = 1;
|
| 489 |
+
|
| 490 |
+
for(let y = 0; y < height; y += 2) {
|
| 491 |
+
ctx.beginPath();
|
| 492 |
+
ctx.moveTo(0, y);
|
| 493 |
+
ctx.lineTo(width, y);
|
| 494 |
+
ctx.stroke();
|
| 495 |
+
}
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
document.getElementById('generateBtn').addEventListener('click', generateArt);
|
| 499 |
+
document.getElementById('exportBtn').addEventListener('click', function() {
|
| 500 |
+
const dataURL = artCanvas.toDataURL('image/png');
|
| 501 |
+
const link = document.createElement('a');
|
| 502 |
+
link.download = 'neon-pit-art.png';
|
| 503 |
+
link.href = dataURL;
|
| 504 |
+
link.click();
|
| 505 |
+
playSound('bleep');
|
| 506 |
+
});
|
| 507 |
+
|
| 508 |
+
// Змейка
|
| 509 |
+
const snakeCanvas = document.getElementById('snakeCanvas');
|
| 510 |
+
const snakeCtx = snakeCanvas.getContext('2d');
|
| 511 |
+
const bigSnakeCanvas = document.getElementById('bigSnakeCanvas');
|
| 512 |
+
const bigSnakeCtx = bigSnakeCanvas.getContext('2d');
|
| 513 |
+
const snakeScoreElement = document.getElementById('snakeScore');
|
| 514 |
+
const bigSnakeScoreElement = document.getElementById('bigSnakeScore');
|
| 515 |
+
|
| 516 |
+
let snake = [];
|
| 517 |
+
let food = {};
|
| 518 |
+
let direction = 'right';
|
| 519 |
+
let nextDirection = 'right';
|
| 520 |
+
let gameLoop;
|
| 521 |
+
let score = 0;
|
| 522 |
+
let gameSpeed = 150;
|
| 523 |
+
let invertedControls = false;
|
| 524 |
+
let viruses = [];
|
| 525 |
+
|
| 526 |
+
function initSnake() {
|
| 527 |
+
snake = [
|
| 528 |
+
{x: 100, y: 100},
|
| 529 |
+
{x: 90, y: 100},
|
| 530 |
+
{x: 80, y: 100}
|
| 531 |
+
];
|
| 532 |
+
|
| 533 |
+
direction = 'right';
|
| 534 |
+
nextDirection = 'right';
|
| 535 |
+
score = 0;
|
| 536 |
+
gameSpeed = 150;
|
| 537 |
+
invertedControls = false;
|
| 538 |
+
viruses = [];
|
| 539 |
+
generateFood();
|
| 540 |
+
|
| 541 |
+
if (snakeCanvas === document.getElementById('snakeCanvas')) {
|
| 542 |
+
snakeScoreElement.textContent = 'SCORE: 0';
|
| 543 |
+
} else {
|
| 544 |
+
bigSnakeScoreElement.textContent = 'SCORE: 0';
|
| 545 |
+
}
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
function generateFood() {
|
| 549 |
+
const canvas = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCanvas : bigSnakeCanvas;
|
| 550 |
+
const gridSize = 10;
|
| 551 |
+
|
| 552 |
+
food = {
|
| 553 |
+
x: Math.floor(Math.random() * (canvas.width / gridSize)) * gridSize,
|
| 554 |
+
y: Math.floor(Math.random() * (canvas.height / gridSize)) * gridSize
|
| 555 |
+
};
|
| 556 |
+
|
| 557 |
+
// Проверяем, чтобы еда ��е появилась на змейке
|
| 558 |
+
for (let segment of snake) {
|
| 559 |
+
if (segment.x === food.x && segment.y === food.y) {
|
| 560 |
+
return generateFood();
|
| 561 |
+
}
|
| 562 |
+
}
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
function generateVirus() {
|
| 566 |
+
const canvas = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCanvas : bigSnakeCanvas;
|
| 567 |
+
const gridSize = 10;
|
| 568 |
+
|
| 569 |
+
const virus = {
|
| 570 |
+
x: Math.floor(Math.random() * (canvas.width / gridSize)) * gridSize,
|
| 571 |
+
y: Math.floor(Math.random() * (canvas.height / gridSize)) * gridSize
|
| 572 |
+
};
|
| 573 |
+
|
| 574 |
+
// Проверяем, чтобы вирус не появился на змейке или еде
|
| 575 |
+
for (let segment of snake) {
|
| 576 |
+
if ((segment.x === virus.x && segment.y === virus.y) ||
|
| 577 |
+
(food.x === virus.x && food.y === virus.y)) {
|
| 578 |
+
return generateVirus();
|
| 579 |
+
}
|
| 580 |
+
}
|
| 581 |
+
|
| 582 |
+
viruses.push(virus);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
function drawSnakeGame() {
|
| 586 |
+
const canvas = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCanvas : bigSnakeCanvas;
|
| 587 |
+
const ctx = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCtx : bigSnakeCtx;
|
| 588 |
+
const scoreElement = snakeCanvas === document.getElementById('snakeCanvas') ? snakeScoreElement : bigSnakeScoreElement;
|
| 589 |
+
|
| 590 |
+
// Очищаем canvas
|
| 591 |
+
ctx.fillStyle = '#000';
|
| 592 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 593 |
+
|
| 594 |
+
// Рисуем сетку
|
| 595 |
+
ctx.strokeStyle = 'rgba(0, 245, 255, 0.1)';
|
| 596 |
+
ctx.lineWidth = 1;
|
| 597 |
+
|
| 598 |
+
for(let x = 0; x < canvas.width; x += 20) {
|
| 599 |
+
ctx.beginPath();
|
| 600 |
+
ctx.moveTo(x, 0);
|
| 601 |
+
ctx.lineTo(x, canvas.height);
|
| 602 |
+
ctx.stroke();
|
| 603 |
+
}
|
| 604 |
+
|
| 605 |
+
for(let y = 0; y < canvas.height; y += 20) {
|
| 606 |
+
ctx.beginPath();
|
| 607 |
+
ctx.moveTo(0, y);
|
| 608 |
+
ctx.lineTo(canvas.width, y);
|
| 609 |
+
ctx.stroke();
|
| 610 |
+
}
|
| 611 |
+
|
| 612 |
+
// Рисуем змейку
|
| 613 |
+
snake.forEach((segment, index) => {
|
| 614 |
+
if (index === 0) {
|
| 615 |
+
// Голова
|
| 616 |
+
ctx.fillStyle = '#00f5ff';
|
| 617 |
+
} else {
|
| 618 |
+
ctx.fillStyle = '#00ffc8';
|
| 619 |
+
}
|
| 620 |
+
ctx.fillRect(segment.x, segment.y, 10, 10);
|
| 621 |
+
ctx.strokeStyle = '#000';
|
| 622 |
+
ctx.strokeRect(segment.x, segment.y, 10, 10);
|
| 623 |
+
});
|
| 624 |
+
|
| 625 |
+
// Рисуем еду
|
| 626 |
+
ctx.fillStyle = '#ff0095';
|
| 627 |
+
ctx.beginPath();
|
| 628 |
+
ctx.arc(food.x + 5, food.y + 5, 5, 0, Math.PI * 2);
|
| 629 |
+
ctx.fill();
|
| 630 |
+
|
| 631 |
+
// Рисуем вирусы
|
| 632 |
+
ctx.fillStyle = 'rgba(255, 0, 0, 0.7)';
|
| 633 |
+
viruses.forEach(virus => {
|
| 634 |
+
ctx.beginPath();
|
| 635 |
+
ctx.moveTo(virus.x + 5, virus.y);
|
| 636 |
+
ctx.lineTo(virus.x + 10, virus.y + 5);
|
| 637 |
+
ctx.lineTo(virus.x + 5, virus.y + 10);
|
| 638 |
+
ctx.lineTo(virus.x, virus.y + 5);
|
| 639 |
+
ctx.closePath();
|
| 640 |
+
ctx.fill();
|
| 641 |
+
|
| 642 |
+
// Анимация вируса
|
| 643 |
+
ctx.strokeStyle = 'rgba(255, 0, 0, 0.9)';
|
| 644 |
+
ctx.lineWidth = 2;
|
| 645 |
+
ctx.beginPath();
|
| 646 |
+
ctx.arc(virus.x + 5, virus.y + 5, 7 + Math.random() * 2, 0, Math.PI * 2);
|
| 647 |
+
ctx.stroke();
|
| 648 |
+
});
|
| 649 |
+
|
| 650 |
+
// Обновляем счет
|
| 651 |
+
scoreElement.textContent = `SCORE: ${score}`;
|
| 652 |
+
|
| 653 |
+
// Перемещаем змейку
|
| 654 |
+
const head = {x: snake[0].x, y: snake[0].y};
|
| 655 |
+
|
| 656 |
+
// Определяем направление с учетом инверсии управления
|
| 657 |
+
const currentDirection = invertedControls ?
|
| 658 |
+
(direction === 'up' ? 'down' :
|
| 659 |
+
direction === 'down' ? 'up' :
|
| 660 |
+
direction === 'left' ? 'right' : 'left') :
|
| 661 |
+
direction;
|
| 662 |
+
|
| 663 |
+
if (currentDirection === 'right') head.x += 10;
|
| 664 |
+
if (currentDirection === 'left') head.x -= 10;
|
| 665 |
+
if (currentDirection === 'up') head.y -= 10;
|
| 666 |
+
if (currentDirection === 'down') head.y += 10;
|
| 667 |
+
|
| 668 |
+
// Проверяем столкновение со стенами
|
| 669 |
+
if (head.x < 0 || head.x >= canvas.width || head.y < 0 || head.y >= canvas.height) {
|
| 670 |
+
gameOver();
|
| 671 |
+
return;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
// Проверяем столкновение с собой
|
| 675 |
+
for (let i = 0; i < snake.length; i++) {
|
| 676 |
+
if (head.x === snake[i].x && head.y === snake[i].y) {
|
| 677 |
+
gameOver();
|
| 678 |
+
return;
|
| 679 |
+
}
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
// Проверяем столкновение с вирусами
|
| 683 |
+
for (let i = 0; i < viruses.length; i++) {
|
| 684 |
+
if (head.x === viruses[i].x && head.y === viruses[i].y) {
|
| 685 |
+
gameOver();
|
| 686 |
+
return;
|
| 687 |
+
}
|
| 688 |
+
}
|
| 689 |
+
|
| 690 |
+
// Проверяем, съела ли змейка еду
|
| 691 |
+
if (head.x === food.x && head.y === food.y) {
|
| 692 |
+
score += 10;
|
| 693 |
+
playSound('bleep');
|
| 694 |
+
generateFood();
|
| 695 |
+
|
| 696 |
+
// Каждые 50 очков увеличиваем скорость
|
| 697 |
+
if (score % 50 === 0) {
|
| 698 |
+
gameSpeed = Math.max(gameSpeed - 10, 50);
|
| 699 |
+
}
|
| 700 |
+
|
| 701 |
+
// При 10+ очках включаем инверсию управления
|
| 702 |
+
if (score >= 10 && !invertedControls) {
|
| 703 |
+
invertedControls = true;
|
| 704 |
+
playSound('glitch');
|
| 705 |
+
}
|
| 706 |
+
|
| 707 |
+
// Каждые 5 съеденных яблок появляется вирус
|
| 708 |
+
if (score > 0 && score % 50 === 0) {
|
| 709 |
+
generateVirus();
|
| 710 |
+
}
|
| 711 |
+
} else {
|
| 712 |
+
// Удаляем хвост, если не съели еду
|
| 713 |
+
snake.pop();
|
| 714 |
+
}
|
| 715 |
+
|
| 716 |
+
// Добавляем новую голову
|
| 717 |
+
snake.unshift(head);
|
| 718 |
+
|
| 719 |
+
// Обновляем направление
|
| 720 |
+
direction = nextDirection;
|
| 721 |
+
}
|
| 722 |
+
|
| 723 |
+
function gameOver() {
|
| 724 |
+
clearInterval(gameLoop);
|
| 725 |
+
playSound('error');
|
| 726 |
+
|
| 727 |
+
const canvas = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCanvas : bigSnakeCanvas;
|
| 728 |
+
const ctx = snakeCanvas === document.getElementById('snakeCanvas') ? snakeCtx : bigSnakeCtx;
|
| 729 |
+
|
| 730 |
+
ctx.fillStyle = 'rgba(255, 0, 100, 0.5)';
|
| 731 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 732 |
+
|
| 733 |
+
ctx.fillStyle = '#fff';
|
| 734 |
+
ctx.font = '20px Orbitron';
|
| 735 |
+
ctx.textAlign = 'center';
|
| 736 |
+
ctx.fillText('GAME OVER', canvas.width/2, canvas.height/2);
|
| 737 |
+
|
| 738 |
+
if (snakeCanvas !== document.getElementById('snakeCanvas')) {
|
| 739 |
+
setTimeout(() => {
|
| 740 |
+
document.getElementById('snakeModal').classList.remove('active');
|
| 741 |
+
}, 2000);
|
| 742 |
+
}
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
function playSnakeGame() {
|
| 746 |
+
initSnake();
|
| 747 |
+
|
| 748 |
+
if (snakeCanvas === document.getElementById('snakeCanvas')) {
|
| 749 |
+
gameLoop = setInterval(drawSnakeGame, gameSpeed);
|
| 750 |
+
} else {
|
| 751 |
+
clearInterval(gameLoop);
|
| 752 |
+
gameLoop = setInterval(drawSnakeGame, gameSpeed);
|
| 753 |
+
}
|
| 754 |
+
}
|
| 755 |
+
|
| 756 |
+
// Управление змейкой
|
| 757 |
+
document.addEventListener('keydown', function(e) {
|
| 758 |
+
if (document.getElementById('snakeModal').classList.contains('active')) {
|
| 759 |
+
switch(e.key) {
|
| 760 |
+
case 'ArrowUp':
|
| 761 |
+
if (direction !== 'down') nextDirection = 'up';
|
| 762 |
+
break;
|
| 763 |
+
case 'ArrowDown':
|
| 764 |
+
if (direction !== 'up') nextDirection = 'down';
|
| 765 |
+
break;
|
| 766 |
+
case 'ArrowLeft':
|
| 767 |
+
if (direction !== 'right') nextDirection = 'left';
|
| 768 |
+
break;
|
| 769 |
+
case 'ArrowRight':
|
| 770 |
+
if (direction !== 'left') nextDirection = 'right';
|
| 771 |
+
break;
|
| 772 |
+
}
|
| 773 |
+
}
|
| 774 |
+
});
|
| 775 |
+
|
| 776 |
+
// Динозаврик
|
| 777 |
+
const dinoCanvas = document.getElementById('dinoCanvas');
|
| 778 |
+
const dinoCtx = dinoCanvas.getContext('2d');
|
| 779 |
+
const bigDinoCanvas = document.getElementById('bigDinoCanvas');
|
| 780 |
+
const bigDinoCtx = bigDinoCanvas.getContext('2d');
|
| 781 |
+
const dinoScoreElement = document.getElementById('dinoScore');
|
| 782 |
+
const bigDinoScoreElement = document.getElementById('bigDinoScore');
|
| 783 |
+
|
| 784 |
+
let dino = {
|
| 785 |
+
x: 50,
|
| 786 |
+
y: 100,
|
| 787 |
+
width: 40,
|
| 788 |
+
height: 50,
|
| 789 |
+
isJumping: false,
|
| 790 |
+
jumpVelocity: 0,
|
| 791 |
+
gravity: 0.5
|
| 792 |
+
};
|
| 793 |
+
|
| 794 |
+
let cactuses = [];
|
| 795 |
+
let dinoScore = 0;
|
| 796 |
+
let dinoGameSpeed = 10;
|
| 797 |
+
let dinoGameLoop;
|
| 798 |
+
let isCyberMode = false;
|
| 799 |
+
let lastFrameTime = 0;
|
| 800 |
+
|
| 801 |
+
function initDinoGame() {
|
| 802 |
+
dino = {
|
| 803 |
+
x: 50,
|
| 804 |
+
y: 100,
|
| 805 |
+
width: 40,
|
| 806 |
+
height: 50,
|
| 807 |
+
isJumping: false,
|
| 808 |
+
jumpVelocity: 0,
|
| 809 |
+
gravity: 0.5
|
| 810 |
+
};
|
| 811 |
+
|
| 812 |
+
cactuses = [];
|
| 813 |
+
dinoScore = 0;
|
| 814 |
+
dinoGameSpeed = 10;
|
| 815 |
+
isCyberMode = false;
|
| 816 |
+
lastFrameTime = 0;
|
| 817 |
+
|
| 818 |
+
if (dinoCanvas === document.getElementById('dinoCanvas')) {
|
| 819 |
+
dinoScoreElement.textContent = 'SCORE: 0';
|
| 820 |
+
} else {
|
| 821 |
+
bigDinoScoreElement.textContent = 'SCORE: 0';
|
| 822 |
+
}
|
| 823 |
+
}
|
| 824 |
+
|
| 825 |
+
function drawDinoGame(timestamp) {
|
| 826 |
+
const canvas = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCanvas : bigDinoCanvas;
|
| 827 |
+
const ctx = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCtx : bigDinoCtx;
|
| 828 |
+
const scoreElement = dinoCanvas === document.getElementById('dinoCanvas') ? dinoScoreElement : bigDinoScoreElement;
|
| 829 |
+
|
| 830 |
+
// Очищаем canvas
|
| 831 |
+
if (isCyberMode && dinoScore >= 1000) {
|
| 832 |
+
ctx.fillStyle = '#300';
|
| 833 |
+
} else {
|
| 834 |
+
ctx.fillStyle = '#000';
|
| 835 |
+
}
|
| 836 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 837 |
+
|
| 838 |
+
// Рисуем горизонт
|
| 839 |
+
ctx.strokeStyle = '#00f5ff';
|
| 840 |
+
ctx.lineWidth = 2;
|
| 841 |
+
ctx.beginPath();
|
| 842 |
+
ctx.moveTo(0, canvas.height - 20);
|
| 843 |
+
ctx.lineTo(canvas.width, canvas.height - 20);
|
| 844 |
+
ctx.stroke();
|
| 845 |
+
|
| 846 |
+
// Рисуем динозаврика
|
| 847 |
+
ctx.fillStyle = isCyberMode ? '#00ffc8' : '#00f5ff';
|
| 848 |
+
ctx.fillRect(dino.x, dino.y, dino.width, dino.height);
|
| 849 |
+
|
| 850 |
+
// Глаз
|
| 851 |
+
ctx.fillStyle = '#000';
|
| 852 |
+
ctx.fillRect(dino.x + 25, dino.y + 10, 5, 5);
|
| 853 |
+
|
| 854 |
+
// Очки динозаврика в кибер-режиме
|
| 855 |
+
if (isCyberMode) {
|
| 856 |
+
ctx.strokeStyle = '#fff';
|
| 857 |
+
ctx.lineWidth = 2;
|
| 858 |
+
ctx.beginPath();
|
| 859 |
+
ctx.moveTo(dino.x + 35, dino.y + 15);
|
| 860 |
+
ctx.lineTo(dino.x + 45, dino.y + 15);
|
| 861 |
+
ctx.stroke();
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
// Ноги (анимация бега)
|
| 865 |
+
const legPosition = Math.floor(timestamp / 100) % 2;
|
| 866 |
+
ctx.fillStyle = isCyberMode ? '#00ffc8' : '#00f5ff';
|
| 867 |
+
|
| 868 |
+
// Передняя нога
|
| 869 |
+
ctx.fillRect(
|
| 870 |
+
dino.x + 5,
|
| 871 |
+
dino.y + dino.height - 15,
|
| 872 |
+
10,
|
| 873 |
+
legPosition === 0 ? 15 : 10
|
| 874 |
+
);
|
| 875 |
+
|
| 876 |
+
// Задняя нога
|
| 877 |
+
ctx.fillRect(
|
| 878 |
+
dino.x + 25,
|
| 879 |
+
dino.y + dino.height - (legPosition === 0 ? 10 : 15),
|
| 880 |
+
10,
|
| 881 |
+
legPosition === 0 ? 10 : 15
|
| 882 |
+
);
|
| 883 |
+
|
| 884 |
+
// Генерируем кактусы
|
| 885 |
+
if (Math.random() < 0.02 && (timestamp - lastFrameTime > 1000 || !lastFrameTime)) {
|
| 886 |
+
const cactusHeight = 30 + Math.random() * 30;
|
| 887 |
+
cactuses.push({
|
| 888 |
+
x: canvas.width,
|
| 889 |
+
y: canvas.height - 20 - cactusHeight,
|
| 890 |
+
width: 20,
|
| 891 |
+
height: cactusHeight,
|
| 892 |
+
isGlowing: isCyberMode
|
| 893 |
+
});
|
| 894 |
+
lastFrameTime = timestamp;
|
| 895 |
+
}
|
| 896 |
+
|
| 897 |
+
// Рисуем и перемещаем кактусы
|
| 898 |
+
for (let i = 0; i < cactuses.length; i++) {
|
| 899 |
+
const cactus = cactuses[i];
|
| 900 |
+
|
| 901 |
+
// Рисуем кактус
|
| 902 |
+
if (cactus.isGlowing) {
|
| 903 |
+
// Неоновые кактусы в кибер-режиме
|
| 904 |
+
ctx.fillStyle = 'rgba(255, 0, 255, 0.7)';
|
| 905 |
+
ctx.fillRect(cactus.x, cactus.y, cactus.width, cactus.height);
|
| 906 |
+
|
| 907 |
+
ctx.strokeStyle = 'rgba(255, 0, 255, 0.9)';
|
| 908 |
+
ctx.lineWidth = 2;
|
| 909 |
+
ctx.strokeRect(cactus.x - 1, cactus.y - 1, cactus.width + 2, cactus.height + 2);
|
| 910 |
+
|
| 911 |
+
// Анимация свечения
|
| 912 |
+
ctx.strokeStyle = 'rgba(255, 0, 255, 0.3)';
|
| 913 |
+
ctx.lineWidth = 4;
|
| 914 |
+
ctx.strokeRect(cactus.x - 3, cactus.y - 3, cactus.width + 6, cactus.height + 6);
|
| 915 |
+
} else {
|
| 916 |
+
ctx.fillStyle = '#00f5ff';
|
| 917 |
+
ctx.fillRect(cactus.x, cactus.y, cactus.width, cactus.height);
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
// Перемещаем кактус
|
| 921 |
+
cactus.x -= dinoGameSpeed;
|
| 922 |
+
|
| 923 |
+
// Удаляем кактусы за пределами экрана
|
| 924 |
+
if (cactus.x + cactus.width < 0) {
|
| 925 |
+
cactuses.splice(i, 1);
|
| 926 |
+
i--;
|
| 927 |
+
dinoScore += 10;
|
| 928 |
+
scoreElement.textContent = `SCORE: ${dinoScore}`;
|
| 929 |
+
|
| 930 |
+
// Увеличиваем скорость каждые 100 очков
|
| 931 |
+
if (dinoScore % 100 === 0) {
|
| 932 |
+
dinoGameSpeed += 0.5;
|
| 933 |
+
}
|
| 934 |
+
|
| 935 |
+
// Активируем кибер-режим при 1000 очков
|
| 936 |
+
if (dinoScore >= 1000 && !isCyberMode) {
|
| 937 |
+
isCyberMode = true;
|
| 938 |
+
playSound('cyber');
|
| 939 |
+
// Превращаем все кактусы в неоновые
|
| 940 |
+
for (let cactus of cactuses) {
|
| 941 |
+
cactus.isGlowing = true;
|
| 942 |
+
}
|
| 943 |
+
}
|
| 944 |
+
}
|
| 945 |
+
|
| 946 |
+
// Проверяем столкновение
|
| 947 |
+
if (
|
| 948 |
+
dino.x + dino.width > cactus.x &&
|
| 949 |
+
dino.x < cactus.x + cactus.width &&
|
| 950 |
+
dino.y + dino.height > cactus.y
|
| 951 |
+
) {
|
| 952 |
+
dinoGameOver();
|
| 953 |
+
return;
|
| 954 |
+
}
|
| 955 |
+
}
|
| 956 |
+
|
| 957 |
+
// Физика прыжка
|
| 958 |
+
if (dino.isJumping) {
|
| 959 |
+
dino.y -= dino.jumpVelocity;
|
| 960 |
+
dino.jumpVelocity -= dino.gravity;
|
| 961 |
+
|
| 962 |
+
// Приземление
|
| 963 |
+
if (dino.y >= canvas.height - 20 - dino.height) {
|
| 964 |
+
dino.y = canvas.height - 20 - dino.height;
|
| 965 |
+
dino.isJumping = false;
|
| 966 |
+
dino.jumpVelocity = 0;
|
| 967 |
+
playSound('land');
|
| 968 |
+
}
|
| 969 |
+
}
|
| 970 |
+
|
| 971 |
+
// Обновляем счет
|
| 972 |
+
scoreElement.textContent = `SCORE: ${dinoScore}`;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
+
function dinoGameOver() {
|
| 976 |
+
cancelAnimationFrame(dinoGameLoop);
|
| 977 |
+
playSound('error');
|
| 978 |
+
|
| 979 |
+
const canvas = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCanvas : bigDinoCanvas;
|
| 980 |
+
const ctx = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCtx : bigDinoCtx;
|
| 981 |
+
|
| 982 |
+
ctx.fillStyle = 'rgba(255, 0, 100, 0.5)';
|
| 983 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 984 |
+
|
| 985 |
+
ctx.fillStyle = '#fff';
|
| 986 |
+
ctx.font = '20px Orbitron';
|
| 987 |
+
ctx.textAlign = 'center';
|
| 988 |
+
ctx.fillText('GAME OVER', canvas.width/2, canvas.height/2);
|
| 989 |
+
ctx.font = '16px Orbitron';
|
| 990 |
+
ctx.fillText(`YOUR SCORE: ${dinoScore}`, canvas.width/2, canvas.height/2 + 30);
|
| 991 |
+
|
| 992 |
+
if (dinoCanvas !== document.getElementById('dinoCanvas')) {
|
| 993 |
+
setTimeout(() => {
|
| 994 |
+
document.getElementById('dinoModal').classList.remove('active');
|
| 995 |
+
}, 2000);
|
| 996 |
+
}
|
| 997 |
+
}
|
| 998 |
+
|
| 999 |
+
function playDinoGame() {
|
| 1000 |
+
initDinoGame();
|
| 1001 |
+
|
| 1002 |
+
if (dinoCanvas === document.getElementById('dinoCanvas')) {
|
| 1003 |
+
dinoGameLoop = requestAnimationFrame(function gameLoop(timestamp) {
|
| 1004 |
+
drawDinoGame(timestamp);
|
| 1005 |
+
dinoGameLoop = requestAnimationFrame(gameLoop);
|
| 1006 |
+
});
|
| 1007 |
+
} else {
|
| 1008 |
+
cancelAnimationFrame(dinoGameLoop);
|
| 1009 |
+
dinoGameLoop = requestAnimationFrame(function gameLoop(timestamp) {
|
| 1010 |
+
drawDinoGame(timestamp);
|
| 1011 |
+
dinoGameLoop = requestAnimationFrame(gameLoop);
|
| 1012 |
+
});
|
| 1013 |
+
}
|
| 1014 |
+
}
|
| 1015 |
+
|
| 1016 |
+
// Управление динозавриком
|
| 1017 |
+
document.addEventListener('keydown', function(e) {
|
| 1018 |
+
if (e.code === 'Space' && !dino.isJumping) {
|
| 1019 |
+
dino.isJumping = true;
|
| 1020 |
+
dino.jumpVelocity = 12;
|
| 1021 |
+
playSound('jump');
|
| 1022 |
+
}
|
| 1023 |
+
|
| 1024 |
+
// Чит-код для кибер-режима: ↑↑↓↓←→←→
|
| 1025 |
+
if (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
|
| 1026 |
+
handleKonamiCode(e.key);
|
| 1027 |
+
}
|
| 1028 |
+
});
|
| 1029 |
+
|
| 1030 |
+
// Реализация кода Konami для активации кибер-режима
|
| 1031 |
+
let konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight'];
|
| 1032 |
+
let konamiIndex = 0;
|
| 1033 |
+
|
| 1034 |
+
function handleKonamiCode(key) {
|
| 1035 |
+
if (key === konamiCode[konamiIndex]) {
|
| 1036 |
+
konamiIndex++;
|
| 1037 |
+
if (konamiIndex === konamiCode.length) {
|
| 1038 |
+
isCyberMode = true;
|
| 1039 |
+
konamiIndex = 0;
|
| 1040 |
+
playSound('cyber');
|
| 1041 |
+
|
| 1042 |
+
const canvas = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCanvas : bigDinoCanvas;
|
| 1043 |
+
const ctx = dinoCanvas === document.getElementById('dinoCanvas') ? dinoCtx : bigDinoCtx;
|
| 1044 |
+
|
| 1045 |
+
// Визуальный эффект активации
|
| 1046 |
+
ctx.fillStyle = 'rgba(0, 245, 255, 0.7)';
|
| 1047 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 1048 |
+
|
| 1049 |
+
setTimeout(() => {
|
| 1050 |
+
ctx.fillStyle = '#000';
|
| 1051 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 1052 |
+
}, 200);
|
| 1053 |
+
}
|
| 1054 |
+
} else {
|
| 1055 |
+
konamiIndex = 0;
|
| 1056 |
+
}
|
| 1057 |
+
}
|
| 1058 |
+
|
| 1059 |
+
// Мини-игра "Убей вирус"
|
| 1060 |
+
const virusCanvas = document.getElementById('virusGameCanvas');
|
| 1061 |
+
const virusCtx = virusCanvas.getContext('2d');
|
| 1062 |
+
const virusScoreElement = document.getElementById('virusScore');
|
| 1063 |
+
const virusTimeElement = document.getElementById('virusTime');
|
| 1064 |
+
|
| 1065 |
+
let virusesInGame = [];
|
| 1066 |
+
let virusScore = 0;
|
| 1067 |
+
let virusTime = 30;
|
| 1068 |
+
let virusInterval;
|
| 1069 |
+
let virusGameLoop;
|
| 1070 |
+
|
| 1071 |
+
function initVirusGame() {
|
| 1072 |
+
virusesInGame = [];
|
| 1073 |
+
virusScore = 0;
|
| 1074 |
+
virusTime = 30;
|
| 1075 |
+
virusScoreElement.textContent = 'DESTROYED: 0';
|
| 1076 |
+
virusTimeElement.textContent = 'TIME LEFT: 30';
|
| 1077 |
+
|
| 1078 |
+
virusInterval = setInterval(function() {
|
| 1079 |
+
virusTime--;
|
| 1080 |
+
virusTimeElement.textContent = `TIME LEFT: ${virusTime}`;
|
| 1081 |
+
|
| 1082 |
+
if (virusTime <= 0) {
|
| 1083 |
+
virusGameOver();
|
| 1084 |
+
}
|
| 1085 |
+
}, 1000);
|
| 1086 |
+
|
| 1087 |
+
virusGameLoop = requestAnimationFrame(drawVirusGame);
|
| 1088 |
+
}
|
| 1089 |
+
|
| 1090 |
+
function drawVirusGame() {
|
| 1091 |
+
virusCtx.fillStyle = '#000';
|
| 1092 |
+
virusCtx.fillRect(0, 0, virusCanvas.width, virusCanvas.height);
|
| 1093 |
+
|
| 1094 |
+
// Рисуем сетку
|
| 1095 |
+
virusCtx.strokeStyle = 'rgba(255, 0, 0, 0.1)';
|
| 1096 |
+
virusCtx.lineWidth = 1;
|
| 1097 |
+
|
| 1098 |
+
for(let x = 0; x < virusCanvas.width; x += 40) {
|
| 1099 |
+
virusCtx.beginPath();
|
| 1100 |
+
virusCtx.moveTo(x, 0);
|
| 1101 |
+
virusCtx.lineTo(x, virusCanvas.height);
|
| 1102 |
+
virusCtx.stroke();
|
| 1103 |
+
}
|
| 1104 |
+
|
| 1105 |
+
for(let y = 0; y < virusCanvas.height; y += 40) {
|
| 1106 |
+
virusCtx.beginPath();
|
| 1107 |
+
virusCtx.moveTo(0, y);
|
| 1108 |
+
virusCtx.lineTo(virusCanvas.width, y);
|
| 1109 |
+
virusCtx.stroke();
|
| 1110 |
+
}
|
| 1111 |
+
|
| 1112 |
+
// Генерируем новые вирусы
|
| 1113 |
+
if (Math.random() < 0.05 && virusesInGame.length < 10) {
|
| 1114 |
+
const size = 20 + Math.random() * 20;
|
| 1115 |
+
virusesInGame.push({
|
| 1116 |
+
x: Math.random() * (virusCanvas.width - size),
|
| 1117 |
+
y: Math.random() * (virusCanvas.height - size),
|
| 1118 |
+
width: size,
|
| 1119 |
+
height: size,
|
| 1120 |
+
speedX: (Math.random() - 0.5) * 4,
|
| 1121 |
+
speedY: (Math.random() - 0.5) * 4,
|
| 1122 |
+
health: 3
|
| 1123 |
+
});
|
| 1124 |
+
}
|
| 1125 |
+
|
| 1126 |
+
// Рисуем и перемещаем вирусы
|
| 1127 |
+
for (let i = 0; i < virusesInGame.length; i++) {
|
| 1128 |
+
const virus = virusesInGame[i];
|
| 1129 |
+
|
| 1130 |
+
// Рисуем вирус
|
| 1131 |
+
virusCtx.fillStyle = `rgba(255, 0, 0, ${0.3 + virus.health * 0.2})`;
|
| 1132 |
+
virusCtx.beginPath();
|
| 1133 |
+
virusCtx.moveTo(virus.x + virus.width/2, virus.y);
|
| 1134 |
+
virusCtx.lineTo(virus.x + virus.width, virus.y + virus.height/2);
|
| 1135 |
+
virusCtx.lineTo(virus.x + virus.width/2, virus.y + virus.height);
|
| 1136 |
+
virusCtx.lineTo(virus.x, virus.y + virus.height/2);
|
| 1137 |
+
virusCtx.closePath();
|
| 1138 |
+
virusCtx.fill();
|
| 1139 |
+
|
| 1140 |
+
// Анимация вируса
|
| 1141 |
+
virusCtx.strokeStyle = `rgba(255, 0, 0, ${0.5 + virus.health * 0.1})`;
|
| 1142 |
+
virusCtx.lineWidth = 2;
|
| 1143 |
+
virusCtx.beginPath();
|
| 1144 |
+
virusCtx.arc(virus.x + virus.width/2, virus.y + virus.height/2, virus.width/2 + 5, 0, Math.PI * 2);
|
| 1145 |
+
virusCtx.stroke();
|
| 1146 |
+
|
| 1147 |
+
// Перемещаем вирус
|
| 1148 |
+
virus.x += virus.speedX;
|
| 1149 |
+
virus.y += virus.speedY;
|
| 1150 |
+
|
| 1151 |
+
// Отскок от стен
|
| 1152 |
+
if (virus.x <= 0 || virus.x + virus.width >= virusCanvas.width) {
|
| 1153 |
+
virus.speedX = -virus.speedX;
|
| 1154 |
+
}
|
| 1155 |
+
|
| 1156 |
+
if (virus.y <= 0 || virus.y + virus.height >= virusCanvas.height) {
|
| 1157 |
+
virus.speedY = -virus.speedY;
|
| 1158 |
+
}
|
| 1159 |
+
}
|
| 1160 |
+
}
|
| 1161 |
+
|
| 1162 |
+
virusCanvas.addEventListener('click', function(e) {
|
| 1163 |
+
const rect = virusCanvas.getBoundingClientRect();
|
| 1164 |
+
const mouseX = e.clientX - rect.left;
|
| 1165 |
+
const mouseY = e.clientY - rect.top;
|
| 1166 |
+
|
| 1167 |
+
for (let i = 0; i < virusesInGame.length; i++) {
|
| 1168 |
+
const virus = virusesInGame[i];
|
| 1169 |
+
|
| 1170 |
+
// Проверяем, попал ли клик по вирусу
|
| 1171 |
+
if (
|
| 1172 |
+
mouseX >= virus.x &&
|
| 1173 |
+
mouseX <= virus.x + virus.width &&
|
| 1174 |
+
mouseY >= virus.y &&
|
| 1175 |
+
mouseY <= virus.y + virus.height
|
| 1176 |
+
) {
|
| 1177 |
+
virus.health--;
|
| 1178 |
+
playSound('bleep');
|
| 1179 |
+
|
| 1180 |
+
if (virus.health <= 0) {
|
| 1181 |
+
virusesInGame.splice(i, 1);
|
| 1182 |
+
virusScore++;
|
| 1183 |
+
virusScoreElement.textContent = `DESTROYED: ${virusScore}`;
|
| 1184 |
+
}
|
| 1185 |
+
}
|
| 1186 |
+
}
|
| 1187 |
+
});
|
| 1188 |
+
|
| 1189 |
+
function virusGameOver() {
|
| 1190 |
+
clearInterval(virusInterval);
|
| 1191 |
+
cancelAnimationFrame(virusGameLoop);
|
| 1192 |
+
|
| 1193 |
+
virusCtx.fillStyle = 'rgba(255, 0, 100, 0.5)';
|
| 1194 |
+
virusCtx.fillRect(0, 0, virusCanvas.width, virusCanvas.height);
|
| 1195 |
+
|
| 1196 |
+
virusCtx.fillStyle = '#fff';
|
| 1197 |
+
virusCtx.font = '20px Orbitron';
|
| 1198 |
+
virusCtx.textAlign = 'center';
|
| 1199 |
+
virusCtx.fillText('TIME UP!', virusCanvas.width/2, virusCanvas.height/2);
|
| 1200 |
+
virusCtx.font = '16px Orbitron';
|
| 1201 |
+
virusCtx.fillText(`VIRUSES DESTROYED: ${virusScore}`, virusCanvas.width/2, virusCanvas.height/2 + 30);
|
| 1202 |
+
|
| 1203 |
+
setTimeout(() => {
|
| 1204 |
+
document.getElementById('virusModal').classList.remove('active');
|
| 1205 |
+
}, 2000);
|
| 1206 |
+
}
|
| 1207 |
+
|
| 1208 |
+
// Вспомогательные функции
|
| 1209 |
+
function playSound(type) {
|
| 1210 |
+
const sounds = {
|
| 1211 |
+
bleep: [650, 100, 0.3, 0.2],
|
| 1212 |
+
glitch: [220, 50, 0.5, 0.01],
|
| 1213 |
+
cyber: [100, 100, 0.7, 0.5],
|
| 1214 |
+
jump: [400, 50, 0.3, 0.2],
|
| 1215 |
+
land: [200, 100, 0.4, 0.1],
|
| 1216 |
+
error: [150, 500, 0.8, 0.01]
|
| 1217 |
+
};
|
| 1218 |
+
|
| 1219 |
+
if (!sounds[type]) return;
|
| 1220 |
+
|
| 1221 |
+
const [freq, duration, volume, decay] = sounds[type];
|
| 1222 |
+
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
| 1223 |
+
const oscillator = audioCtx.createOscillator();
|
| 1224 |
+
const gainNode = audioCtx.createGain();
|
| 1225 |
+
|
| 1226 |
+
oscillator.type = 'square';
|
| 1227 |
+
oscillator.frequency.setValueAtTime(freq, audioCtx.currentTime);
|
| 1228 |
+
gainNode.gain.setValueAtTime(volume, audioCtx.currentTime);
|
| 1229 |
+
gainNode.gain.exponentialRampToValueAtTime(0.01, audioCtx.currentTime + decay);
|
| 1230 |
+
|
| 1231 |
+
oscillator.connect(gainNode);
|
| 1232 |
+
gainNode.connect(audioCtx.destination);
|
| 1233 |
+
|
| 1234 |
+
oscillator.start();
|
| 1235 |
+
oscillator.stop(audioCtx.currentTime + duration / 1000);
|
| 1236 |
+
}
|
| 1237 |
+
|
| 1238 |
+
// Активация игр
|
| 1239 |
+
document.getElementById('playSnakeBtn').addEventListener('click', function() {
|
| 1240 |
+
playSnakeGame();
|
| 1241 |
+
});
|
| 1242 |
+
|
| 1243 |
+
document.getElementById('playDinoBtn').addEventListener('click', function() {
|
| 1244 |
+
playDinoGame();
|
| 1245 |
+
});
|
| 1246 |
+
|
| 1247 |
+
// Модальные окна для игр
|
| 1248 |
+
document.getElementById('snakeModal').addEventListener('click', function(e) {
|
| 1249 |
+
if (e.target === this) {
|
| 1250 |
+
clearInterval(gameLoop);
|
| 1251 |
+
this.classList.remove('active');
|
| 1252 |
+
}
|
| 1253 |
+
});
|
| 1254 |
+
|
| 1255 |
+
document.getElementById('dinoModal').addEventListener('click', function(e) {
|
| 1256 |
+
if (e.target === this) {
|
| 1257 |
+
cancelAnimationFrame(dinoGameLoop);
|
| 1258 |
+
this.classList.remove('active');
|
| 1259 |
+
}
|
| 1260 |
+
});
|
| 1261 |
+
|
| 1262 |
+
document.getElementById('virusModal').addEventListener('click', function(e) {
|
| 1263 |
+
if (e.target === this) {
|
| 1264 |
+
virusGameOver();
|
| 1265 |
+
this.classList.remove('active');
|
| 1266 |
+
}
|
| 1267 |
+
});
|
| 1268 |
+
|
| 1269 |
+
document.getElementById('closeSnakeBtn').addEventListener('click', function() {
|
| 1270 |
+
clearInterval(gameLoop);
|
| 1271 |
+
document.getElementById('snakeModal').classList.remove('active');
|
| 1272 |
+
});
|
| 1273 |
+
|
| 1274 |
+
document.getElementById('closeDinoBtn').addEventListener('click', function() {
|
| 1275 |
+
cancelAnimationFrame(dinoGameLoop);
|
| 1276 |
+
document.getElementById('dinoModal').classList.remove('active');
|
| 1277 |
+
});
|
| 1278 |
+
|
| 1279 |
+
document.getElementById('closeVirusBtn').addEventListener('click', function() {
|
| 1280 |
+
virusGameOver();
|
| 1281 |
+
document.getElementById('virusModal').classList.remove('active');
|
| 1282 |
+
});
|
| 1283 |
+
|
| 1284 |
+
// Переход на FunPay с эффектом
|
| 1285 |
+
document.getElementById('funpayBtn').addEventListener('click', function() {
|
| 1286 |
+
playSound('cyber');
|
| 1287 |
+
|
| 1288 |
+
// Эффект перехода
|
| 1289 |
+
const blueScreen = document.getElementById('blueScreen');
|
| 1290 |
+
blueScreen.style.opacity = '1';
|
| 1291 |
+
blueScreen.style.pointerEvents = 'all';
|
| 1292 |
+
|
| 1293 |
+
setTimeout(() => {
|
| 1294 |
+
window.location.href = 'https://funpay.com/users/7439472/';
|
| 1295 |
+
}, 2000);
|
| 1296 |
+
});
|
| 1297 |
+
|
| 1298 |
+
// Комбинация клавиш Ctrl+Alt+Del для мини-игры с вирусами
|
| 1299 |
+
const keysPressed = {};
|
| 1300 |
+
|
| 1301 |
+
document.addEventListener('keydown', function(e) {
|
| 1302 |
+
keysPressed[e.key] = true;
|
| 1303 |
+
|
| 1304 |
+
if (keysPressed['Control'] && keysPressed['Alt'] && keysPressed['Delete']) {
|
| 1305 |
+
document.getElementById('virusModal').classList.add('active');
|
| 1306 |
+
initVirusGame();
|
| 1307 |
+
|
| 1308 |
+
// Сбрасываем комбинацию
|
| 1309 |
+
keysPressed['Control'] = false;
|
| 1310 |
+
keysPressed['Alt'] = false;
|
| 1311 |
+
keysPressed['Delete'] = false;
|
| 1312 |
+
}
|
| 1313 |
+
});
|
| 1314 |
+
|
| 1315 |
+
document.addEventListener('keyup', function(e) {
|
| 1316 |
+
keysPressed[e.key] = false;
|
| 1317 |
+
});
|
| 1318 |
+
|
| 1319 |
+
// Синий экран смерти при бездействии
|
| 1320 |
+
let inactivityTime = 0;
|
| 1321 |
+
|
| 1322 |
+
function resetInactivityTimer() {
|
| 1323 |
+
inactivityTime = 0;
|
| 1324 |
+
document.getElementById('blueScreen').style.opacity = '0';
|
| 1325 |
+
document.getElementById('blueScreen').style.pointerEvents = 'none';
|
| 1326 |
+
}
|
| 1327 |
+
|
| 1328 |
+
setInterval(function() {
|
| 1329 |
+
inactivityTime++;
|
| 1330 |
+
|
| 1331 |
+
if (inactivityTime > 300) { // 300 * 100ms = 30 секунд (измените на 3000 для 5 минут)
|
| 1332 |
+
document.getElementById('blueScreen').style.opacity = '1';
|
| 1333 |
+
document.getElementById('blueScreen').style.pointerEvents = 'all';
|
| 1334 |
+
}
|
| 1335 |
+
}, 100);
|
| 1336 |
+
|
| 1337 |
+
// Сбрасываем таймер при любом действии
|
| 1338 |
+
['mousemove', 'keydown', 'click', 'scroll', 'touchstart'].forEach(function(event) {
|
| 1339 |
+
document.addEventListener(event, resetInactivityTimer, false);
|
| 1340 |
+
});
|
| 1341 |
+
|
| 1342 |
+
// Инициализация
|
| 1343 |
+
generateArt();
|
| 1344 |
+
|
| 1345 |
+
// Модальные окна для игр для превью
|
| 1346 |
+
document.getElementById('snakeCanvas').addEventListener('click', function() {
|
| 1347 |
+
document.getElementById('snakeModal').classList.add('active');
|
| 1348 |
+
playSnakeGame();
|
| 1349 |
+
});
|
| 1350 |
+
|
| 1351 |
+
document.getElementById('dinoCanvas').addEventListener('click', function() {
|
| 1352 |
+
document.getElementById('dinoModal').classList.add('active');
|
| 1353 |
+
playDinoGame();
|
| 1354 |
+
});
|
| 1355 |
+
|
| 1356 |
+
// Адаптация canvas при изменении размера окна
|
| 1357 |
+
window.addEventListener('resize', function() {
|
| 1358 |
+
artCanvas.width = artCanvas.offsetWidth;
|
| 1359 |
+
artCanvas.height = artCanvas.offsetHeight;
|
| 1360 |
+
generateArt();
|
| 1361 |
+
});
|
| 1362 |
+
</script>
|
| 1363 |
+
<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>
|
| 1364 |
+
</html>
|