fix(shelf): match cubby divider depth to the boards (no front overflow, no back seam)

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) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-06-16 12:57:00 -04:00
co-authored by Claude Opus 4.8
parent c717c0c13d
commit c68dfa2095
+6 -7
View File
@@ -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}`