diff --git a/apps/editor/components/ui/sidebar/panels/site-panel/index.tsx b/apps/editor/components/ui/sidebar/panels/site-panel/index.tsx index b53da349..a6924faf 100644 --- a/apps/editor/components/ui/sidebar/panels/site-panel/index.tsx +++ b/apps/editor/components/ui/sidebar/panels/site-panel/index.tsx @@ -1,5 +1,6 @@ import { type BuildingNode, + emitter, LevelNode, useScene, type ZoneNode, @@ -7,6 +8,7 @@ import { import { useViewer } from "@pascal-app/viewer"; import { Building2, + Camera, ChevronDown, Layers, MoreHorizontal, @@ -155,11 +157,13 @@ function BuildingSelector() { function LevelsSection() { const nodes = useScene((state) => state.nodes); const createNode = useScene((state) => state.createNode); + const updateNode = useScene((state) => state.updateNode); const selectedBuildingId = useViewer((state) => state.selection.buildingId); const selectedLevelId = useViewer((state) => state.selection.levelId); const setSelection = useViewer((state) => state.setSelection); const [referencesLevelId, setReferencesLevelId] = useState(null); + const [cameraPopoverOpen, setCameraPopoverOpen] = useState(null); const building = selectedBuildingId ? (nodes[selectedBuildingId] as BuildingNode) @@ -215,6 +219,72 @@ function LevelsSection() { {level.name || `Level ${level.level}`} + {/* Camera snapshot button */} + setCameraPopoverOpen(open ? level.id : null)}> + + + + e.stopPropagation()} + > +
+ {level.camera && ( + + )} + + {level.camera && ( + + )} +
+
+
+ + e.stopPropagation()} + > +
+ {zone.camera && ( + + )} + + {zone.camera && ( + + )} +
+
+
+ + e.stopPropagation()} + > +
+ {zone.camera && ( + + )} + + {zone.camera && ( + + )} +
+
+