From 46d80c0bdf9743abcc98388cb401b07e07347c5d Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Tue, 26 May 2026 18:25:57 +0300 Subject: [PATCH] =?UTF-8?q?refactor(labs):=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=20=D0=BF=D0=B0=D0=BD?= =?UTF-8?q?=D0=B5=D0=BB=D0=B8=20=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=94=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8=D0=BA?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Расширена с 248px до 300px - Mode selector: 5 в ряд → 2 ряда (Песочница/Классика, I/II/III законы) с понятными названиями + tooltips - Sandbox-панель: секции Мир/Отображение/Время/Пресеты обёрнуты в
(collapsible) с акцентом-стрелкой - 21 пресет сгруппирован по 5 категориям: Базовые/Столкновения/Пружины и осцилляторы/Маятники и блоки/Горки и стопки - Шрифты увеличены с .65-.72rem до .78-.82rem (mode buttons, tool grid, checkboxes, presets, подсказки) - Newton-панель: сцены A/B/C, классические Атвуд/Наклон/Качение — кнопки крупнее - Topbar ctrl-dynamics: .65rem → .78rem для всех инструментов и сцен - Подсказки (help boxes) перерисованы с большим контрастом и шрифтом - Новый CSS-блок .dyn-panel-modern с детализированным acc-styling --- frontend/css/lab.css | 155 ++++++++++++++++++++++++ frontend/lab.html | 272 ++++++++++++++++++++++++------------------- 2 files changed, 306 insertions(+), 121 deletions(-) diff --git a/frontend/css/lab.css b/frontend/css/lab.css index b4471c9..635cbef 100644 --- a/frontend/css/lab.css +++ b/frontend/css/lab.css @@ -1945,6 +1945,161 @@ canvas[data-draggable]:active { cursor: grabbing; } .ptbl-reaction-eq { font-size: .78rem; font-weight: 600; font-family: 'Courier New', monospace; } .ptbl-reaction-note { font-size: .68rem; color: rgba(255,255,255,0.3); font-style: italic; margin-top: 4px; } +/* ═══════════════════════════════════════════════════════════ + DYNAMICS PANEL — modern layout + ═══════════════════════════════════════════════════════════ */ +.dyn-panel-modern { + font-size: .82rem; +} +.dyn-panel-modern .gp-section-title { + font-size: .72rem; + margin: 10px 0 8px; +} +.dyn-mode-bar { + display: flex; + gap: 4px; + padding: 3px; + background: rgba(255,255,255,0.04); + border-radius: 10px; + border: 1px solid var(--border); + margin-bottom: 6px; +} +.dyn-mode-bar .mag-mode-btn { + flex: 1; + font-size: .8rem; + padding: 6px 4px; + border: none; +} +.dyn-mode-bar .mag-mode-btn.active { + background: rgba(155,93,229,0.18); + color: var(--violet); + border: 1px solid rgba(155,93,229,0.45); +} + +/* tool grid 3 col */ +.dyn-tool-grid { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 5px; + margin-bottom: 12px; +} +.dyn-tool-grid .mag-mode-btn { + font-size: .8rem; + padding: 7px 4px; + flex-direction: column; + gap: 2px; +} +.dyn-tool-grid .mag-mode-btn .ic { width: 14px; height: 14px; } + +/* row helpers */ +.dyn-row-2 { + display: flex; + gap: 5px; + margin-bottom: 12px; +} +.dyn-row-2 .mag-mode-btn { flex: 1; font-size: .8rem; padding: 7px 6px; } +.dyn-row-4 { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + gap: 4px; +} +.dyn-row-4 .mag-mode-btn { font-size: .78rem; padding: 6px 0; } + +/* check lists */ +.dyn-checks { + display: flex; + flex-direction: column; + gap: 7px; + margin-bottom: 10px; +} +.dyn-checks label, +.dyn-check-inline { + display: flex; + align-items: center; + gap: 8px; + font-size: .82rem; + color: var(--text-2); + cursor: pointer; + line-height: 1.3; +} +.dyn-checks input[type="checkbox"], +.dyn-check-inline input[type="checkbox"] { + width: 14px; + height: 14px; + accent-color: var(--violet); + flex-shrink: 0; +} + +/* accordion sections */ +.dyn-acc { + border: 1px solid var(--border); + border-radius: 10px; + margin-bottom: 8px; + background: rgba(255,255,255,0.02); + overflow: hidden; +} +.dyn-acc > summary { + cursor: pointer; + list-style: none; + padding: 9px 12px 9px 30px; + font-family: 'Unbounded', sans-serif; + font-size: .78rem; + font-weight: 700; + color: var(--text); + letter-spacing: .04em; + text-transform: uppercase; + position: relative; + user-select: none; + transition: background .15s; +} +.dyn-acc > summary:hover { background: rgba(255,255,255,0.04); } +.dyn-acc > summary::-webkit-details-marker { display: none; } +.dyn-acc > summary::before { + content: ''; + position: absolute; + left: 12px; + top: 50%; + width: 0; + height: 0; + border-left: 5px solid currentColor; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + transform: translateY(-50%); + transition: transform .18s; + opacity: .65; +} +.dyn-acc[open] > summary::before { + transform: translateY(-50%) rotate(90deg); +} +.dyn-acc-body { + padding: 10px 12px 12px; + border-top: 1px solid var(--border); +} + +/* preset categories */ +.dyn-preset-cat { + font-size: .72rem; + font-weight: 700; + color: rgba(255,255,255,0.55); + text-transform: uppercase; + letter-spacing: .05em; + margin: 12px 0 6px; +} +.dyn-preset-cat:first-child { margin-top: 2px; } +.dyn-preset-grp { + display: flex; + flex-wrap: wrap; + gap: 5px; +} +.dyn-preset-grp .proj-preset-chip { + font-size: .78rem; + padding: 5px 11px; +} + +/* hint box at bottom */ +.dyn-panel-modern .param-name { font-size: .82rem; } +.dyn-panel-modern .param-val { font-size: .84rem; } + /* ── GraphPanel toggle button active state ── */ #btn-pend-graphs.active, #btn-coll-graphs.active, diff --git a/frontend/lab.html b/frontend/lab.html index 92a6e9b..54eb690 100644 --- a/frontend/lab.html +++ b/frontend/lab.html @@ -225,24 +225,24 @@
-
Отображение
-
- - - - - -
+
+ Время +
+
+ + + + +
+
+
-
Время
-
- - - - -
+
+ Пресеты +
+
Базовые
+
+ + + + + +
+
Столкновения
+
+ + + + +
+
Пружины и осцилляторы
+
+ + + + +
+
Маятники и блоки
+
+ + + + + +
+
Горки и стопки
+
+ + + + + +
+
+
-
Пресеты
-
- - - - - - - - - - - - - - - - - - - - - - - -
- -
+
+ Управление ЛКМ — создать тело · Drag — сила
Shift+drag — импульс · ПКМ — удалить
DblClick — закрепить / открепить
@@ -1748,14 +1778,14 @@
-
- +
+
-