File size: 5,590 Bytes
02bd28b 1a01086 02bd28b | 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 | <!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>РЕСУРС — Инновационная группа</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background: #0B1750;
}
body {
width: 100vw;
height: 100vh;
position: relative;
}
#logo-container {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
text-align: center;
}
#logo {
width: 400px;
max-width: 90vw;
height: auto;
display: block;
margin: 0 auto;
}
#web-bg {
position: fixed;
top: 0; left: 0;
width: 100vw;
height: 100vh;
z-index: 1;
display: block;
}
</style>
</head>
<body>
<canvas id="web-bg"></canvas>
<div id="logo-container">
<img id="logo" src="http://1.chat-gpt-online.ru/1.png" alt="РЕСУРС — Инновационная группа">
<div style="margin-top: 32px; color: #fff; font-size: 2rem; font-family: Arial, sans-serif; letter-spacing: 1px;">
новый сайт в разработке
</div>
</div>
<script>
const POINTS = 300;
const LINK_DIST = 120;
const SPEED = 0.20;
const MOUSE_RADIUS = 50;
const ATTRACT_STRENGTH = 0.015;
const CHAOS = 0.008; // Меньше — плавнее
const canvas = document.getElementById('web-bg');
const ctx = canvas.getContext('2d');
let width = window.innerWidth;
let height = window.innerHeight;
function resize() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
}
window.addEventListener('resize', resize);
resize();
// Генерация точек
let points = [];
for (let i = 0; i < POINTS; i++) {
// Для плавного шума — у каждой точки свой угол направления
let angle = Math.random() * Math.PI * 2;
points.push({
x: Math.random() * width,
y: Math.random() * height,
vx: Math.cos(angle) * SPEED,
vy: Math.sin(angle) * SPEED,
angle: angle,
angleSpeed: (Math.random() - 0.5) * CHAOS
});
}
// Координаты мыши
let mouse = { x: null, y: null, active: false };
canvas.addEventListener('mousemove', function(e) {
const rect = canvas.getBoundingClientRect();
mouse.x = e.clientX - rect.left;
mouse.y = e.clientY - rect.top;
mouse.active = true;
});
canvas.addEventListener('mouseleave', function() {
mouse.active = false;
});
function animate() {
ctx.clearRect(0, 0, width, height);
for (let p of points) {
// Плавное изменение направления (без дрожи)
p.angle += p.angleSpeed;
// Немного меняем скорость угла для большей естественности
p.angleSpeed += (Math.random() - 0.5) * CHAOS * 0.2;
p.angleSpeed = Math.max(Math.min(p.angleSpeed, CHAOS), -CHAOS);
// Постепенно корректируем скорость к новому направлению
p.vx += (Math.cos(p.angle) * SPEED - p.vx) * 0.02;
p.vy += (Math.sin(p.angle) * SPEED - p.vy) * 0.02;
// Притяжение к мыши
if (mouse.active) {
let dx = mouse.x - p.x;
let dy = mouse.y - p.y;
let dist = Math.sqrt(dx * dx + dy * dy);
if (dist < MOUSE_RADIUS) {
let force = (1 - dist / MOUSE_RADIUS) * ATTRACT_STRENGTH;
p.vx += dx * force;
p.vy += dy * force;
}
}
// Сглаживание скорости
p.vx *= 0.96;
p.vy *= 0.96;
p.x += p.vx;
p.y += p.vy;
// Отражение от краёв
if (p.x < 0) { p.x = 0; p.vx *= -1; }
if (p.x > width) { p.x = width; p.vx *= -1; }
if (p.y < 0) { p.y = 0; p.vy *= -1; }
if (p.y > height) { p.y = height; p.vy *= -1; }
}
// Рисование линий между близкими точками
for (let i = 0; i < POINTS; i++) {
for (let j = i + 1; j < POINTS; j++) {
let dx = points[i].x - points[j].x;
let dy = points[i].y - points[j].y;
let dist = Math.sqrt(dx * dx + dy * dy);
if (dist < LINK_DIST) {
ctx.strokeStyle = `rgba(255,255,255,${1 - dist / LINK_DIST})`;
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(points[i].x, points[i].y);
ctx.lineTo(points[j].x, points[j].y);
ctx.stroke();
}
}
}
// Рисование точек
for (let p of points) {
ctx.beginPath();
ctx.arc(p.x, p.y, 2, 0, 2 * Math.PI);
ctx.fillStyle = "#fff";
ctx.fill();
}
requestAnimationFrame(animate);
}
animate();
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=wer32/resource" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |