From 58bdcff44a5f4933c8d7dfa630ace75f4c224792 Mon Sep 17 00:00:00 2001 From: nodemode-ai Date: Sat, 5 Dec 2026 22:17:41 -0500 Subject: [PATCH 1/8] feat(3d): the 3D View fills the window, with a tools toggle, zoom buttons and a mouse guide (0.14.1) The 3D View opened as a 760 by 540 floating panel; it now fills the window between the title bar and the status bar (remembered; the new header button, a double-click on the header or Escape go back to floating), the side tools can be hidden for a full-width model, Zoom In and Zoom Out sit beside Reset View, and a line on the model says how to rotate, zoom and pan. The panel also binds a structure added to an empty drawing while it is open, so Build 3D is no longer greyed out. Checked in headless Chromium: open fills 1500 x 878, floating 760 x 540, orbit, zoom and middle-drag pan, two drawings in one session. --- frontend/src/styles/view3d.css | 5 +++ frontend/src/ui/view3d-panel.ts | 65 ++++++++++++++++++++++++++++++-- frontend/src/ui/view3d-viewer.ts | 5 +++ 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/frontend/src/styles/view3d.css b/frontend/src/styles/view3d.css index cb721e94..efd04e9f 100644 --- a/frontend/src/styles/view3d.css +++ b/frontend/src/styles/view3d.css @@ -1,5 +1,10 @@ .fc-v3d { position: fixed; top: calc(var(--fc-titlebar-h, 40px) + 16px); right: 16px; z-index: var(--z-companion); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; width: min(760px, calc(100vw - 32px)); height: min(540px, calc(100vh - 96px)); min-width: 420px; min-height: 340px; overflow: hidden; resize: both; border: 1px solid var(--line-3, var(--line-2)); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--shadow-lg); color: var(--text-primary); font-size: var(--fc-13); } .fc-v3d[hidden] { display: none; } +.fc-v3d.is-max { top: var(--fc-titlebar-h, 40px) !important; right: 0 !important; bottom: var(--fc-status-h, 28px) !important; left: 0 !important; width: auto !important; height: auto !important; min-width: 0; resize: none; border-width: 1px 0; border-radius: 0; box-shadow: none; } +.fc-v3d.is-max .fc-v3d-head { cursor: default; } +.fc-v3d.is-noside .fc-v3d-main { grid-template-columns: minmax(0, 1fr) 0; } +.fc-v3d.is-noside .fc-v3d-side { visibility: hidden; border-left: 0; } +.fc-v3d-mouse { position: absolute; top: 8px; left: 10px; z-index: var(--z-local-2); max-width: calc(100% - 20px); margin: 0; padding: 4px 8px; border-radius: var(--radius); background: var(--glass-bg); color: var(--text-muted); font-size: var(--fc-12); line-height: 1.3; pointer-events: none; } .fc-v3d-head { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-1); cursor: grab; user-select: none; touch-action: none; } .fc-v3d-head:active { cursor: grabbing; } .fc-v3d-title { font-weight: 600; } diff --git a/frontend/src/ui/view3d-panel.ts b/frontend/src/ui/view3d-panel.ts index a975a420..176e4e3c 100644 --- a/frontend/src/ui/view3d-panel.ts +++ b/frontend/src/ui/view3d-panel.ts @@ -97,6 +97,8 @@ function markup(): string { return `