From ff8a638d28de3b577facb04c97da247b356af948 Mon Sep 17 00:00:00 2001 From: Kris Anderson Date: Thu, 9 Jul 2026 15:58:12 -0400 Subject: [PATCH] docs(highway_3d): name the concrete camera-bridge globals in comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address a review note on the free-camera block: the comments described the bridge as "per-panel-aware" without naming the actual globals. Spell out that _freeCam comes from _freeCamFor(highwayCanvas) — window.__h3dCamCtlPanels[ panelIndexFor(canvas)] when split, else the global window.__h3dCamCtl, else null — and update the nearby comment that mentioned only __h3dCamCtl. Comment- only; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Kris Anderson --- plugins/highway_3d/screen.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/highway_3d/screen.js b/plugins/highway_3d/screen.js index 521ce97..65e6fef 100644 --- a/plugins/highway_3d/screen.js +++ b/plugins/highway_3d/screen.js @@ -14714,13 +14714,16 @@ if (_poseHMul !== 1) _camY *= _poseHMul; if (_poseDMul !== 1) _camZ *= _poseDMul; // ── Free-camera user tweaks (orbit / height / zoom / pan) ── - // Driven by the Camera Director plugin via window.__h3dCamCtl. + // Driven by the Camera Director plugin via the camera bridge: + // window.__h3dCamCtlPanels[panelIndexFor(canvas)] when split (this + // panel's own camera), falling back to the global window.__h3dCamCtl. // Layered ON TOP of the auto-framing so note tracking still works. // The bridge is read once into _freeCam and reused for both the // position and the look-at transforms; every field is coerced to a // finite number before use so a malformed object can never feed NaN // into cam.position / cam.lookAt. - // _freeCam resolved above (per-panel-aware Camera Director bridge). + // _freeCam resolved above via _freeCamFor(highwayCanvas): the + // per-panel __h3dCamCtlPanels entry, else global __h3dCamCtl, else null. const _lookAtZ = -FOCUS_D * 0.35 * _poseLookZMul; if (_freeCam && _freeCam.enabled) { const _distMul = Number.isFinite(_freeCam.distMul) ? _freeCam.distMul : 1;