slab panel

This commit is contained in:
wass08
2026-02-02 11:17:47 +09:00
parent 0613f846ef
commit 72a0e3952a
6 changed files with 200 additions and 19 deletions
@@ -0,0 +1,34 @@
'use client'
import { useScene } from '@pascal-app/core'
import { useViewer } from '@pascal-app/viewer'
import useEditor from '@/store/use-editor'
import { ReferencePanel } from './reference-panel'
import { RoofPanel } from './roof-panel'
import { SlabPanel } from './slab-panel'
export function PanelManager() {
const selectedIds = useViewer((s) => s.selection.selectedIds)
const selectedReferenceId = useEditor((s) => s.selectedReferenceId)
const nodes = useScene((s) => s.nodes)
// Show reference panel if a reference is selected
if (selectedReferenceId) {
return <ReferencePanel />
}
// Show appropriate panel based on selected node type
if (selectedIds.length === 1) {
const node = nodes[selectedIds[0]!]
if (node) {
switch (node.type) {
case 'roof':
return <RoofPanel />
case 'slab':
return <SlabPanel />
}
}
}
return null
}