Эффекты и шейдеры3DТипографикаМинимализмЯркийБесплатно
Огромный список спикеров на фоне 3D-осколков
Имена спикеров крупным шрифтом поверх колонны зеркальных и чёрно-белых осколков: прокрутка их вращает, строка под курсором красит фон.
Промпт
Добавь на мою страницу эффект «Огромный список спикеров на фоне 3D-осколков» (Сергей Дургалян, MIT). Ниже готовая страница на three.js 0.170.0 (jsdelivr, import map, плюс `RoomEnvironment` из `three/addons`). Сначала перенеси её как есть и проверь: за списком имён висит колонна из тонких зеркальных, чёрных и белых осколков; прокрутка списка вращает колонну и осколки; наведение на строку выделяет её, остальные бледнеют, а фон плавно перекрашивается в цвет строки; без ввода список сам едет вниз и подсвечивает строку в середине экрана, в конце возвращается наверх. Открывай через локальный сервер, а не двойным щелчком по файлу. Потом меняй.
Как устроен код. Canvas three.js закреплён на весь экран, поверх него — прокручиваемый `main#list` со списком `ol#names` (строки создаются из массива `SPEAKERS`: город, код страны, имя, цвет). Сверху и снизу список растворяется маской `mask-image`, чтобы не налезать на шапку. Сцена: `SHARDS` осколков, каждый — случайная фигура из 3–4 вершин, выдавленная на 0,05 (`ExtrudeGeometry`), они стоят по винтовой линии вокруг вертикальной оси. Три материала `MeshStandardMaterial`: зеркальный (metalness 1, roughness 0.08), чёрный и матовый белый; блеск даёт `scene.environment` из `PMREMGenerator` + `RoomEnvironment`. В цикле `frame` прогресс прокрутки `p` (0…1) поворачивает группу на `p * SPIN`, каждый осколок — со своей скоростью `spin`, камера опускается от +2 до −2. Наведение и фокус строки вызывают `setActive`: класс `.on` у строки, `.focus` у списка (остальные строки в 38% прозрачности), целевой цвет фона; текущий цвет каждый кадр подтягивается к целевому (`lerp`) и пишется и в `scene.background`, и в фон страницы. Демо: после 2 секунд без ввода список прокручивается со скоростью `AUTO_SPEED` и активной становится строка, пересекающая середину экрана. На телефоне колонна меньше и осколков вдвое меньше. При `prefers-reduced-motion` нет автопрокрутки и фонового вращения, фон меняется сразу.
Что менять: спикеров, города и цвета — массив `SPEAKERS`; число и размер осколков — `SHARDS` и `rnd(.4, 1.2)`; силу вращения — `SPIN`; положение колонны — `group.position.x` в `resize`; доли материалов — выбор `mats[...]` в цикле создания; базовый цвет фона — `BASE` и `background` в CSS.
Если проект на React: сцену three.js создавай в `useEffect` с очисткой (`renderer.dispose()`, отмена `requestAnimationFrame`), список рендери обычным JSX, а активную строку храни в `useRef`, чтобы не перерисовывать список каждый кадр. Либо используй @react-three/fiber: осколки — `mesh` в `map`, вращение — в `useFrame`.
Предложи, как оформить так список спикеров, авторов или команды моего проекта, и подбери 12 строк с цветами.
Код скопируется вместе с промптом
Страница спикеров конференции: огромные имена строками, слева город и код страны, справа стрелка. За ними — колонна из полусотни тонких осколков: зеркальных, чёрных и белых. Прокрутка списка проворачивает колонну и каждый осколок по отдельности, камера при этом опускается вдоль неё. Наведение на строку выделяет её, остальные бледнеют, а весь фон плавно перекрашивается в цвет этого спикера. Без ввода список сам медленно едет вниз, а подсвечивается строка, проходящая через середину экрана. Приём подсмотрен на imdday.ch.
Осколки процедурные: каждый — случайный треугольник или четырёхугольник, выдавленный в тонкую пластину (ExtrudeGeometry), а зеркальный блеск даёт карта окружения из RoomEnvironment, никаких текстур и моделей. Список — обычный HTML поверх canvas, поэтому его легко поменять и он доступен для чтения. Подходит для конференции, фестиваля, лайнапа, списка авторов или команды.
Код
<!-- MIT License. Copyright (c) 2026 Sergei Durgalian, learn.create-products.com/design. Free to use, copy and modify with this notice kept. -->
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Shard Names List</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500&display=swap">
<style>
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a7a8ad; color: #fff; font-family: "Inter Tight", sans-serif; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.top { position: fixed; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 18px clamp(16px, 3vw, 40px); font-size: 13px; line-height: 1.25; pointer-events: none; }
.top b { font-weight: 500; }
main { position: fixed; z-index: 1; inset: 0; overflow-y: auto; scrollbar-width: none; padding: 22vh clamp(16px, 8vw, 140px) 40vh; }
main { -webkit-mask-image: linear-gradient(transparent, #000 13vh, #000 88vh, transparent); mask-image: linear-gradient(transparent, #000 13vh, #000 88vh, transparent); }
main::-webkit-scrollbar { display: none; }
ol { list-style: none; margin: 0; padding: 0; }
li { display: grid; grid-template-columns: minmax(110px, 16%) 1fr auto; align-items: center; gap: 0 2vw; padding: 1.4vh 0; border-top: 1px solid #ffffff55; cursor: pointer; transition: opacity .35s; }
li:last-child { border-bottom: 1px solid #ffffff55; }
.city { font-size: clamp(15px, 1.9vw, 30px); line-height: 1.05; font-weight: 500; }
.name { font-size: clamp(34px, 6.4vw, 104px); line-height: .98; font-weight: 500; letter-spacing: -.035em; }
.arr { font-size: clamp(20px, 2.4vw, 36px); transition: transform .35s; }
ol.focus li { opacity: .38; }
ol.focus li.on { opacity: 1; }
li.on .arr { transform: rotate(-90deg); }
@media (max-width: 700px) { li { grid-template-columns: 1fr auto; } .city { grid-column: 1 / -1; font-size: 13px; margin-bottom: 2px; } .city br { display: none; } }
</style>
</head>
<body>
<canvas id="c" aria-hidden="true"></canvas>
<div class="top"><span><b>Дни медиа-дизайна</b><br>Пермь · 14–16 апреля</span><span>Спикеры<br>2027</span></div>
<main id="list"><ol id="names" aria-label="Спикеры"></ol></main>
<script type="importmap">{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/" } }</script>
<script type="module">
import * as THREE from "three";
import { RoomEnvironment } from "three/addons/environments/RoomEnvironment.js";
const SHARDS = 50; // number of glass/metal fragments
const SPIN = 5; // how much a full scroll turns the shards
const AUTO_SPEED = 38; // px per second of auto-scroll in the demo
const IDLE_DEMO = 2000;
const BASE = new THREE.Color("#a7a8ad");
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
const SPEAKERS = [
["Казань", "РФ", "Вера Лисицына", "#ff5a3c"], ["Тбилиси", "GEO", "Арсен Мелик", "#3b5bff"], ["Пермь", "РФ", "Студия «Поле»", "#12a877"],
["Алматы", "KAZ", "Дана Сейтова", "#e0a000"], ["Минск", "BLR", "Олег Ворона", "#8a4dff"], ["Ереван", "ARM", "Лиана Аветян", "#ff4fa3"],
["Самара", "РФ", "Ника Гром", "#00a6c8"], ["Белград", "SRB", "Марко Илич", "#ff7a00"], ["Новосибирск", "РФ", "Коллектив «Сдвиг»", "#4b4b52"],
["Ташкент", "UZB", "Тимур Алиев", "#d1365f"], ["Калининград", "РФ", "Юлия Берг", "#2f7d4e"], ["Баку", "AZE", "Эмиль Гасан", "#5468ff"],
];
const ol = document.getElementById("names"), list = document.getElementById("list");
SPEAKERS.forEach(([city, cc, name, color]) => {
const li = document.createElement("li"); li.tabIndex = 0; li.dataset.color = color;
li.innerHTML = `<span class="city">${city} <br>${cc}</span><span class="name">${name}</span><span class="arr" aria-hidden="true">↙</span>`;
ol.append(li);
});
const rows = [...ol.children];
// three.js: a twisting column of thin mirror / black / white shards
const canvas = document.getElementById("c");
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
const scene = new THREE.Scene(); scene.background = BASE.clone();
scene.environment = new THREE.PMREMGenerator(renderer).fromScene(new RoomEnvironment(), 0.04).texture;
const camera = new THREE.PerspectiveCamera(35, 1, 0.1, 100); camera.position.set(0, 0, 13);
const mats = [
new THREE.MeshStandardMaterial({ color: "#ffffff", metalness: 1, roughness: 0.08 }), // mirror
new THREE.MeshStandardMaterial({ color: "#111114", metalness: 0.4, roughness: 0.25 }), // black
new THREE.MeshStandardMaterial({ color: "#f4f4f4", metalness: 0, roughness: 0.6 }), // white
];
const rnd = (a, b) => a + Math.random() * (b - a);
const group = new THREE.Group(); scene.add(group);
const shards = [];
for (let i = 0; i < SHARDS; i++) {
const s = new THREE.Shape(), n = Math.random() < .6 ? 3 : 4, r = rnd(.4, 1.2);
for (let k = 0; k < n; k++) { const a = k / n * Math.PI * 2 + rnd(-.5, .5), d = r * rnd(.5, 1.2); k ? s.lineTo(Math.cos(a) * d, Math.sin(a) * d * 1.6) : s.moveTo(Math.cos(a) * d, Math.sin(a) * d * 1.6); }
const geo = new THREE.ExtrudeGeometry(s, { depth: 0.05, bevelEnabled: false }); geo.center();
const m = new THREE.Mesh(geo, mats[i % 5 === 0 ? 1 : i % 7 === 0 ? 2 : 0]);
const a = i * 0.47, rad = rnd(1.2, 3.4);
m.position.set(Math.cos(a) * rad, (i / SHARDS - .5) * 13, Math.sin(a) * rad);
m.userData = { rx: rnd(0, 6), ry: rnd(0, 6), spin: rnd(.4, 1.4) * (Math.random() < .5 ? -1 : 1) };
group.add(m); shards.push(m);
}
function resize() {
renderer.setSize(innerWidth, innerHeight, false);
camera.aspect = innerWidth / innerHeight; camera.updateProjectionMatrix();
const small = innerWidth < 700;
group.position.x = small ? .6 : 2.4; group.scale.setScalar(small ? .55 : 1);
shards.forEach((m, i) => { m.visible = !small || i % 2 === 0; }); // fewer shards on phones
}
addEventListener("resize", resize); resize();
// hover / focus: the row lights up, the others fade, the scene takes its color
const bg = BASE.clone(), target = BASE.clone();
let current = null;
function setActive(li) {
if (li === current) return; current = li;
rows.forEach((r) => r.classList.toggle("on", r === li)); ol.classList.toggle("focus", !!li);
target.set(li ? li.dataset.color : BASE);
}
rows.forEach((li) => { li.addEventListener("pointerenter", () => setActive(li)); li.addEventListener("focus", () => setActive(li)); });
ol.addEventListener("pointerleave", () => setActive(null));
// demo: slow auto-scroll, the row crossing the middle is highlighted
let lastInput = -1e9, last = performance.now(), pos = 0;
["wheel", "touchstart", "pointerdown", "keydown"].forEach((ev) => addEventListener(ev, () => { lastInput = performance.now(); }, { passive: true }));
addEventListener("pointermove", (e) => { if (e.pointerType === "mouse") lastInput = performance.now(); }, { passive: true });
function frame(now) {
const dt = Math.min(.05, (now - last) / 1000); last = now;
const max = list.scrollHeight - list.clientHeight;
if (now - lastInput > IDLE_DEMO && !reduced) {
pos = pos >= max ? 0 : Math.max(pos, list.scrollTop) + AUTO_SPEED * dt; // loop back to the top
if (pos === 0) list.scrollTop = 0; else list.scrollTop = pos;
const mid = innerHeight * .5;
setActive(rows.find((r) => { const b = r.getBoundingClientRect(); return b.top < mid && b.bottom > mid; }) || null);
} else pos = list.scrollTop;
const p = max > 0 ? list.scrollTop / max : 0; // 0..1 scroll progress
group.rotation.y = p * SPIN + (reduced ? 0 : now * 0.00004);
camera.position.y = (.5 - p) * 4; camera.lookAt(group.position.x * .6, camera.position.y * .6, 0);
for (const m of shards) { m.rotation.set(m.userData.rx + p * SPIN * m.userData.spin, m.userData.ry + p * 2 * m.userData.spin, 0); }
bg.lerp(target, reduced ? 1 : 0.06); scene.background.copy(bg); document.body.style.background = bg.getStyle();
renderer.render(scene, camera);
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
</script>
</body>
</html>