Major layout redesign introducing v2 editor layout: **New Features** - V2 two-column layout (resizable sidebar + viewer panel with toolbar slots) - 3D box select tool with marquee selection (561 lines pure Three.js geometry) - View mode system (3D/2D/Split) replacing old floorplan toggle - Floating level selector on viewer panel - Viewer toolbar: level mode, wall mode, units, theme, camera, walkthrough, preview - Horizontal tab bar for sidebar panels **Layout Changes** - Fixed 5-button control bar: Select, Box Select, Site Edit, Build, Delete - Simplified view toggles (scans/guides only) - Always-mounted viewers (display:none) to preserve WebGL context - First-person walkthrough forces 3D view, restores on exit - Site edit as permanent control (phase='site' is sole signal) **Technical** - layoutVersion prop: 'v1' (default) or 'v2' - New exports: FloatingLevelSelector, SettingsPanel, SidebarTab, ViewMode, ViewerToolbarLeft/Right - isCollapsed/setIsCollapsed added to sidebar store - isFirstPersonMode restored for walkthrough support 19 files changed, +3230/-1898 Built and verified: bun run build passes (all tasks, 0 errors)
31 lines
631 B
TypeScript
31 lines
631 B
TypeScript
'use client'
|
|
|
|
import {
|
|
Editor,
|
|
type SidebarTab,
|
|
ViewerToolbarLeft,
|
|
ViewerToolbarRight,
|
|
} from '@pascal-app/editor'
|
|
|
|
const SIDEBAR_TABS: (SidebarTab & { component: React.ComponentType })[] = [
|
|
{
|
|
id: 'site',
|
|
label: 'Scene',
|
|
component: () => null, // Built-in SitePanel handles this
|
|
},
|
|
]
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div className="h-screen w-screen">
|
|
<Editor
|
|
layoutVersion="v2"
|
|
projectId="local-editor"
|
|
sidebarTabs={SIDEBAR_TABS}
|
|
viewerToolbarLeft={<ViewerToolbarLeft />}
|
|
viewerToolbarRight={<ViewerToolbarRight />}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|