From 7e23dabf3bde7eb03f0bee2cdbf3c3b0d301e260 Mon Sep 17 00:00:00 2001 From: Karim Date: Sun, 5 Jul 2026 22:43:38 +0200 Subject: [PATCH] Ribbon 3D-Tab: Kamera-Presets + Darstellungsart; truck-Integration geplant 2026-07-07 --- src/App.tsx | 16 +++++++- src/ui/TopBar.tsx | 93 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index c6eb0a4..77ec77f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -69,7 +69,7 @@ import type { Pick3dHit } from "./viewport/Wasm3DViewport"; import { ResourceManager } from "./ui/ResourceManager"; import type { ResourceManagerHandlers } from "./ui/ResourceManager"; import { HatchSwatch } from "./ui/hatchPreview"; -import { TopBar, ViewRibbonTab } from "./ui/TopBar"; +import { TopBar, ViewRibbonTab, Ribbon3dTab } from "./ui/TopBar"; import { RibbonBar } from "./ui/ribbon/RibbonBar"; import type { RibbonTabId } from "./ui/ribbon/ribbonItems"; import { Dropdown } from "./ui/Dropdown"; @@ -3320,6 +3320,20 @@ export default function App() { textTarget={textTarget} /> ), + "3d": ( + + ), }} /> diff --git a/src/ui/TopBar.tsx b/src/ui/TopBar.tsx index 62ead48..9be63af 100644 --- a/src/ui/TopBar.tsx +++ b/src/ui/TopBar.tsx @@ -1262,6 +1262,99 @@ export function ViewRibbonTab({ ); } +export interface Ribbon3dTabProps { + viewToggleEnabled: boolean; + viewType: ViewType; + onViewType: (v: ViewType) => void; + view3d: View3d; + onView3d: (v: View3d) => void; + fov: number; + onFov: (n: number) => void; + renderMode: RenderMode; + onRenderMode: (m: RenderMode) => void; + renderModeEnabled: boolean; +} + +/** 3D-Tab des Ribbons — Kamera-Presets + Darstellungsart. Kein Duplikat des + * Ansichten-Tabs: hier nur 3D-relevante Steuerung (Blickwinkel, Rendermodus). */ +export function Ribbon3dTab({ + viewToggleEnabled, + viewType, + onViewType, + view3d, + onView3d, + fov, + onFov, + renderMode, + onRenderMode, + renderModeEnabled, +}: Ribbon3dTabProps) { + return ( +
+
+
+ + {( + [ + ["top", t("view3d.top")], + ["iso", t("view3d.iso")], + ["perspective", t("view3d.perspective")], + ["front", t("view3d.front")], + ["side", t("view3d.side")], + ] as [View3d, string][] + ).map(([key, label]) => ( + + ))} + +
+
+ +
+ +
+
+ ); +} + export function TopBar({ project, ribbonTab,