[213] Kameras als Modell-Elemente und Begehen (WASD) im 3D
Project.cameras (Rust Camera: Standpunkt + Augenhöhe über Geschoss, Ziel, Bildwinkel, Perspektive/ Axonometrie/Parallel, Sonnenstand) auf der neuen Klasse "Kameras" (92). Grundriss-Symbol im Kern (plan/cameras.rs: Gehäuse, Sichtkegel, Ziel, Name, schmale Pick-Bänder), Griffe im Kern (camera.rs, grips.rs: Standpunkt, Ziel, Bildwinkel/Sichtbreite), Auswahl/Entf, Objekt-Info CameraSection, Liste im Panel Ausschnitte, "Kamera aus aktueller Ansicht anlegen", "Kamera öffnen" (auch per Doppelklick auf das Symbol), cameraToView() für das Rendering [211]. Begehen im 3D: Umschalt+F, W/A/S/D/Pfeile, Q/E, Umschalt/Alt, Umschauen um den Augpunkt (viewport/walk.ts). Beispiel: Kamera im Musterhaus komplex.
This commit is contained in:
64 files changed
+2031
-50
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// Rad-Zoom, Doppelklick und Kontextmenü der Plan-Ansicht ([165] aus `PlanView.tsx`). Im GPU-Pfad zoomt
|
||||
// das Rad imperativ und schreibt den Ausschnitt nach kurzer Ruhe fest. Aufgerufen einmal von `PlanView`.
|
||||
|
||||
import { openCamera } from "../../../state/cameraActions";
|
||||
import type { ViewBox__plan_planView_geometry as ViewBox } from "../../../core";
|
||||
import type { Vec2 } from "../../../model/types";
|
||||
import { clamp } from "../../../core";
|
||||
@@ -32,6 +33,7 @@ export interface UsePlanZoomInputArgs {
|
||||
pickRoom: (clientX: number, clientY: number) => string | null;
|
||||
onOpenSectionLevel: ((levelId: string) => void) | undefined;
|
||||
pickSectionLine: (clientX: number, clientY: number) => string | null;
|
||||
pickCamera: (clientX: number, clientY: number) => string | null;
|
||||
onContextMenu: ((info: { clientX: number; clientY: number; model: Vec2; }) => void) | undefined;
|
||||
view: ViewBox;
|
||||
viewToModel: (vbX: number, vbY: number) => Vec2;
|
||||
@@ -60,6 +62,7 @@ export function usePlanZoomInput(inp: UsePlanZoomInputArgs) {
|
||||
pickRoom,
|
||||
onOpenSectionLevel,
|
||||
pickSectionLine,
|
||||
pickCamera,
|
||||
onContextMenu,
|
||||
view,
|
||||
viewToModel,
|
||||
@@ -163,6 +166,12 @@ export function usePlanZoomInput(inp: UsePlanZoomInputArgs) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// [213] Doppelklick auf das Symbol einer Kamera → die Kamera im 3D öffnen (Reiter wechseln, Ansicht exakt setzen).
|
||||
const cid = pickCamera(e.clientX, e.clientY);
|
||||
if (cid) {
|
||||
void openCamera(cid);
|
||||
return;
|
||||
}
|
||||
// Doppelklick auf eine Schnittlinie → in deren 2D-Schnittansicht springen.
|
||||
if (onOpenSectionLevel) {
|
||||
const sid = pickSectionLine(e.clientX, e.clientY);
|
||||
|
||||
Reference in new issue
Block a user