В balance-задании по мере ввода коэффициентов показывается счётчик атомов
каждого элемента слева=справа с ✓/✗ и бейджем «сбалансировано» (через
BIO.parseFormula). Обучающая обратная связь до отправки ответа.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
В biochem-core.js добавлен расчёт химии из структуры (client-side, для всех
страниц): partialCharges (по разнице электроотрицательностей на связях),
dipole (векторная сумма q·r по 3D-координатам VSEPR), polarity (классификация
по дипольному моменту), massFractions, functionalGroups, analyze (единая точка).
chargeColor + поддержка opts.charges в render2D/render3D + стрелка диполя.
biochem.html: крудные эвристики _detectFG/_polarity/ATOMIC_MASS заменены на
BIO.analyze (−95 строк дублей); в панель свойств добавлен дипольный момент;
тумблер δ± — тепловая карта частичных зарядов (синий δ+/красный δ−) в 2D и 3D
плюс стрелка диполя.
Проверено: H2O O=−0.52/H=+0.26; CO2/CH4/CCl4 диполь 0 (неполярны);
H2O/CHCl3 полярны — симметрия гасит вектора за счёт настоящей 3D-геометрии.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Фаза 0 (фундамент) + Фаза 1 (3D) плана BIOCHEM_UPGRADE:
- Новый общий модуль frontend/js/biochem-core.js (window.BIO): реестр
элементов (CPK, масса, валентность, электроотрицательность, ковалентный/
ван-дер-ваальсов радиусы), hillFormula/molarMass/parseFormula/dbe,
нормализация связей (bF/bT/bO — чинит расхождение полей f/from, o/order),
render2D, vsepr (генератор 3D по ОЭПВО), render3D (ball-and-stick с
глубиной и затенением), safe (обёртка API с тостом), RING_TEMPLATES.
- biochem.html: подключён core; фейковый 3D (плоская проекция a.z||0)
заменён на честную VSEPR-геометрию через BIO.render3D; в панель свойств
добавлены форма молекулы, гибридизация и валентный угол; фикс бага
порядка связи в getBondSum.
VSEPR проверен: вода — угловая, метан — тетраэдр 109.5°, CO2 — линейная
180°, NH3 — пирамидальная; sp/sp2/sp3 верно.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3D rendering (toggle3D/render3D with VDW radii + sphere gradients) was
implemented but had no visible Esc-key exit and cursor was left in 'grab'
state when leaving 3D mode. Changes:
- Esc key now exits 3D mode (toggle3D) in addition to cancel/close actions
- cursor correctly resets to 'crosshair' on 3D exit and 'grab' on enter
- btn-3d toolbar button confirmed visible with mode-3d-active active state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add js/sidebar.js: generates full sidebar HTML into #app-sidebar,
handles role-based visibility, active link (with prefix matching),
toggle wiring, collapsed state, board/features/notif init
- Replace <aside class="sidebar">...</aside> with <aside id="app-sidebar">
across all 35 standard-layout pages via scripts/apply-sidebar.js
- Add notifications.js to 5 pages that were missing it
- Fix api.js initPage(): skip toggle re-wiring if data-sb-wired set,
fix active link selector .sb-item → .sb-link
- Remove stale sbl-*/nav-admin/btn-upload-nav getElementById calls
that crashed after sidebar replacement (lab, classes, collection,
crossword, hangman, knowledge-map, library, pet, profile)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Classroom performance:
- WebSocket server (ws-server.js) for low-latency cursor & stroke preview
Replaces HTTP POST per event → eliminates per-message auth overhead
Session member cache (30s TTL) avoids SQLite query per WS message
Fallback to HTTP POST when WS not connected
- Cursor throttle reduced 100ms → 33ms (~30fps)
- Stroke preview throttle reduced 50ms → 20ms
- whiteboard.js: render() is now rAF-gated (_doRender/_rafPending)
Multiple render() calls within one frame collapse into one repaint
document.hidden check — zero CPU when tab is in background
visibilitychange listener restores canvas on tab focus
Guest board:
- guestClassroom.js route: public token-based read-only access
- guest-board.html: name entry + read-only whiteboard + SSE
- SSE: addGuestClient/removeGuestClient/emitToGuests
Screen share picker:
- Discord-style modal with tab switching (screen/window/tab)
- Live video preview before confirming share
- useExistingScreenStream() in ClassroomRTC
Fullscreen exit overlay:
- #cr-fs-exit-overlay button inside cr-board-wrap
- Visible only via CSS :fullscreen selector (touchpad users)
File sharing from library:
- Teacher picks file from library, sends as styled card in chat
- crDownloadLibraryFile() fetches with Bearer auth
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>