Не работает следующий блок:
Browse filesterminalTyping(loadingText, [
"> Initializing neural networks...",
"> Loading 3D asset database...",
"> Connecting to render farm...",
"> Authenticating user profile...",
"> System ready. Welcome to Chopa4ok's digital realm."
], 50, 1500);
import { terminalTyping } from '/js/effects.js'; и это тоже не робит
Почини
- index.html +35 -3
index.html
CHANGED
|
@@ -265,10 +265,42 @@
|
|
| 265 |
<i data-feather="arrow-up" class="text-[#00d1ff]"></i>
|
| 266 |
</div>
|
| 267 |
<script type="module">
|
| 268 |
-
// Enhanced loading sequence with typed effect
|
| 269 |
-
import { terminalTyping } from '/js/effects.js';
|
| 270 |
-
|
| 271 |
// Loading sequence with enhanced animations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
document.addEventListener('DOMContentLoaded', async () => {
|
| 273 |
// Initialize typed loading animation
|
| 274 |
const loadingText = document.getElementById('loading-text');
|
|
|
|
| 265 |
<i data-feather="arrow-up" class="text-[#00d1ff]"></i>
|
| 266 |
</div>
|
| 267 |
<script type="module">
|
|
|
|
|
|
|
|
|
|
| 268 |
// Loading sequence with enhanced animations
|
| 269 |
+
function terminalTyping(element, strings, speed, delay) {
|
| 270 |
+
let currentString = 0;
|
| 271 |
+
let currentChar = 0;
|
| 272 |
+
let isDeleting = false;
|
| 273 |
+
let timeout;
|
| 274 |
+
|
| 275 |
+
function type() {
|
| 276 |
+
const fullText = strings[currentString];
|
| 277 |
+
|
| 278 |
+
if (isDeleting) {
|
| 279 |
+
element.textContent = fullText.substring(0, currentChar - 1);
|
| 280 |
+
currentChar--;
|
| 281 |
+
} else {
|
| 282 |
+
element.textContent = fullText.substring(0, currentChar + 1);
|
| 283 |
+
currentChar++;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
if (!isDeleting && currentChar === fullText.length) {
|
| 287 |
+
isDeleting = true;
|
| 288 |
+
timeout = setTimeout(type, delay);
|
| 289 |
+
} else if (isDeleting && currentChar === 0) {
|
| 290 |
+
isDeleting = false;
|
| 291 |
+
currentString = (currentString + 1) % strings.length;
|
| 292 |
+
timeout = setTimeout(type, speed);
|
| 293 |
+
} else {
|
| 294 |
+
timeout = setTimeout(type, isDeleting ? speed / 2 : speed);
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
type();
|
| 299 |
+
|
| 300 |
+
return {
|
| 301 |
+
stop: () => clearTimeout(timeout)
|
| 302 |
+
};
|
| 303 |
+
}
|
| 304 |
document.addEventListener('DOMContentLoaded', async () => {
|
| 305 |
// Initialize typed loading animation
|
| 306 |
const loadingText = document.getElementById('loading-text');
|