From c68dfa2095a204ff550d48b1fd3f1b7f871577ae Mon Sep 17 00:00:00 2001 From: Wassim SAMAD Date: Tue, 16 Jun 2026 12:57:00 -0400 Subject: [PATCH] fix(shelf): match cubby divider depth to the boards (no front overflow, no back seam) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cubby column divider was full-depth while the boards are depth-recessed, so it (a) sat proud of the shelf fronts — the earlier Y-tuck then made it poke past the top/bottom boards — and (b) shared the back panel's rear plane, z-fighting down the centre of the back. Give the divider the same depth recess as the boards (via boardGeometry) and drop the Y-tuck: it now sits flush with the shelf fronts and its back tucks inside the back panel. Flush top/bottom is fine — those board faces are back-to-back, not co-facing, so they don't fight. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/nodes/src/shelf/geometry.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/nodes/src/shelf/geometry.ts b/packages/nodes/src/shelf/geometry.ts index a3cc1acc..3e4e8d14 100644 --- a/packages/nodes/src/shelf/geometry.ts +++ b/packages/nodes/src/shelf/geometry.ts @@ -350,13 +350,12 @@ function buildCubby(group: Group, node: ShelfNode, materials: ShelfSlotMaterials for (let c = 1; c < node.columns; c++) { const x = -innerWidth / 2 + c * colStep const divider = stampShelfSlot( - // Extend 1mm into the boards above + below (centre unchanged) so the - // divider tucks under the top board and onto the bottom board instead - // of meeting them on a coplanar face (which shimmers / reads merged). - new Mesh( - new BoxGeometry(node.thickness, dividerHeight + 2 * BOARD_INSET, node.depth), - materials.frame, - ), + // Same depth recess as the boards: the divider sits flush with the + // shelf fronts (not proud) and its back tucks inside the back panel, + // so it neither overflows the boards at the front nor z-fights the + // back panel down the centre. Height is flush (the board faces it + // meets top/bottom are back-to-back, so they don't fight). + new Mesh(boardGeometry(node.thickness, dividerHeight, node.depth), materials.frame), 'frame', ) divider.name = `shelf-divider-${r}-${c}`