feat: editor improvements and collapsible sidebars
Add collapse/expand toggle for the AppShell navigation sidebar and the editor properties panel (both persisted to localStorage). Bundles other in-progress editor work including position anchors, outlet sizing, PBR textures, window slope/frame depth, curtain metadata, and various 2D/3D rendering tweaks.
This commit is contained in:
@@ -80,51 +80,42 @@ export function ProjectionWindow({
|
||||
stroke="#93c5fd"
|
||||
strokeWidth={0.5}
|
||||
/>
|
||||
{/* Horizontal mullion (center divider) */}
|
||||
<Line
|
||||
points={[
|
||||
topLeft.x + frameInset,
|
||||
topLeft.y + pxHeight / 2,
|
||||
topLeft.x + pxWidth - frameInset,
|
||||
topLeft.y + pxHeight / 2,
|
||||
]}
|
||||
stroke="#3b82f6"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
{/* Vertical mullion (center divider) */}
|
||||
<Line
|
||||
points={[
|
||||
topLeft.x + pxWidth / 2,
|
||||
topLeft.y + frameInset,
|
||||
topLeft.x + pxWidth / 2,
|
||||
topLeft.y + pxHeight - frameInset,
|
||||
]}
|
||||
stroke="#3b82f6"
|
||||
strokeWidth={1}
|
||||
/>
|
||||
{/* Glass cross lines for indication */}
|
||||
<Line
|
||||
points={[
|
||||
topLeft.x + frameInset,
|
||||
topLeft.y + frameInset,
|
||||
topLeft.x + pxWidth / 2,
|
||||
topLeft.y + pxHeight / 2,
|
||||
]}
|
||||
stroke="#93c5fd"
|
||||
strokeWidth={0.5}
|
||||
opacity={0.6}
|
||||
/>
|
||||
<Line
|
||||
points={[
|
||||
topLeft.x + pxWidth - frameInset,
|
||||
topLeft.y + frameInset,
|
||||
topLeft.x + pxWidth / 2,
|
||||
topLeft.y + pxHeight / 2,
|
||||
]}
|
||||
stroke="#93c5fd"
|
||||
strokeWidth={0.5}
|
||||
opacity={0.6}
|
||||
/>
|
||||
{/* Internal mullions — N×M grid. Rendered as lines spanning the
|
||||
glass area; `gridCols - 1` verticals + `gridRows - 1`
|
||||
horizontals. Defaults to 2×2 for legacy windows without an
|
||||
explicit grid set. */}
|
||||
{(() => {
|
||||
const cols = Math.max(1, Math.min(10, Math.round(opening.gridCols ?? 2)));
|
||||
const rows = Math.max(1, Math.min(10, Math.round(opening.gridRows ?? 2)));
|
||||
const innerLeft = topLeft.x + frameInset;
|
||||
const innerTop = topLeft.y + frameInset;
|
||||
const innerWidth = pxWidth - frameInset * 2;
|
||||
const innerHeight = pxHeight - frameInset * 2;
|
||||
const lines: React.ReactNode[] = [];
|
||||
for (let i = 1; i < cols; i++) {
|
||||
const x = innerLeft + (innerWidth * i) / cols;
|
||||
lines.push(
|
||||
<Line
|
||||
key={`vmul-${i}`}
|
||||
points={[x, innerTop, x, innerTop + innerHeight]}
|
||||
stroke="#3b82f6"
|
||||
strokeWidth={1}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
for (let i = 1; i < rows; i++) {
|
||||
const y = innerTop + (innerHeight * i) / rows;
|
||||
lines.push(
|
||||
<Line
|
||||
key={`hmul-${i}`}
|
||||
points={[innerLeft, y, innerLeft + innerWidth, y]}
|
||||
stroke="#3b82f6"
|
||||
strokeWidth={1}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
return lines;
|
||||
})()}
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user