const audio = new Audio('https://drive.google.com/uc?export=download&id=14u-DjNPuhPWL-3kYlBdEHtCXj8D6kxDt'); audio.loop = true; audio.volume = 0.5; document.addEventListener('click', () => { if (audio.paused) { audio.play().catch(error => console.log("Ошибка воспроизведения:", error)); } }); const canvas = document.createElement('canvas'); document.body.appendChild(canvas); const ctx = canvas.getContext('2d'); canvas.width = window.innerWidth; canvas.height = window.innerHeight; const particles = []; class Particle { constructor(x, y) { this.x = x; this.y = y; this.size = Math.random() * 5 + 1; this.speedX = Math.random() * 3 - 1.5; this.speedY = Math.random() * 3 - 1.5; } update() { this.x += this.speedX; this.y += this.speedY; if (this.size > 0.2) this.size -= 0.1; } draw() { ctx.fillStyle = 'white'; ctx.beginPath(); ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); ctx.fill(); } } function animateParticles() { ctx.clearRect(0, 0, canvas.width, canvas.height); for (let i = 0; i < particles.length; i++) { particles[i].update(); particles[i].draw(); if (particles[i].size <= 0.2) { particles.splice(i, 1); i--; } } requestAnimationFrame(animateParticles); } animateParticles(); document.addEventListener('mousemove', (event) => { for (let i = 0; i < 5; i++) { particles.push(new Particle(event.clientX, event.clientY)); } }); // Обновление размера canvas при изменении окна window.addEventListener('resize', () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; });⇜NektarPNG⇝