[object Object]

← back to Quadrille Showroom

showroom polish (070126A): wrap consultation nook in a group + hide it in the At-the-Table view (only the centre table shows), restore on exit

842a1dc8b34906f8333bef2bbd0c31e5de71cb32 · 2026-07-01 07:24:52 -0700 · Steve Abrams

Files touched

Diff

commit 842a1dc8b34906f8333bef2bbd0c31e5de71cb32
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 1 07:24:52 2026 -0700

    showroom polish (070126A): wrap consultation nook in a group + hide it in the At-the-Table view (only the centre table shows), restore on exit
---
 public/js/showroom.js  | 16 +++++++++++-----
 public/js/viewmodes.js |  2 ++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/public/js/showroom.js b/public/js/showroom.js
index 6bfd632..d97c775 100644
--- a/public/js/showroom.js
+++ b/public/js/showroom.js
@@ -1451,16 +1451,22 @@ function buildConsultationNook(cx, cz) {
   const woodDark = new THREE.MeshStandardMaterial({ color: 0x6e573a, roughness: 0.5, metalness: 0.0 });
   const boucle = new THREE.MeshStandardMaterial({ color: 0xe8e0d0, roughness: 0.95, metalness: 0.0, envMapIntensity: 0.2 });
 
+  // Wrap the whole nook in a group so the table view can hide it (Steve 2026-07-01) —
+  // otherwise the side nook + the centre table both show in "At the Table" (clutter).
+  const nk = new THREE.Group();
+  scene.add(nk);
+  window._qhNookGroup = nk;
+
   const TABLE_R = 0.52, TABLE_H = 0.74;
   // Round top
   const top = new THREE.Mesh(new THREE.CylinderGeometry(TABLE_R, TABLE_R, 0.05, 40), woodTop);
-  top.position.set(cx, TABLE_H, cz); top.castShadow = true; top.receiveShadow = true; scene.add(top);
+  top.position.set(cx, TABLE_H, cz); top.castShadow = true; top.receiveShadow = true; nk.add(top);
   // Pedestal column
   const col = new THREE.Mesh(new THREE.CylinderGeometry(0.07, 0.09, TABLE_H - 0.05, 16), woodDark);
-  col.position.set(cx, (TABLE_H - 0.05) / 2, cz); col.castShadow = true; scene.add(col);
+  col.position.set(cx, (TABLE_H - 0.05) / 2, cz); col.castShadow = true; nk.add(col);
   // Splayed pedestal foot
   const foot = new THREE.Mesh(new THREE.CylinderGeometry(0.30, 0.34, 0.05, 24), woodDark);
-  foot.position.set(cx, 0.03, cz); foot.castShadow = true; foot.receiveShadow = true; scene.add(foot);
+  foot.position.set(cx, 0.03, cz); foot.castShadow = true; foot.receiveShadow = true; nk.add(foot);
   addContactShadow(cx, cz, 0.85, 0.85, 0.7);
 
   // A few swatch cards fanned on the table (small thin tilted planes, warm tones).
@@ -1469,7 +1475,7 @@ function buildConsultationNook(cx, cz) {
     const card = new THREE.Mesh(new THREE.BoxGeometry(0.16, 0.004, 0.22),
       new THREE.MeshStandardMaterial({ color: c, roughness: 0.85, metalness: 0.0 }));
     card.position.set(cx - 0.12 + k * 0.12, TABLE_H + 0.03, cz - 0.05);
-    card.rotation.y = (k - 1) * 0.35; card.castShadow = true; scene.add(card);
+    card.rotation.y = (k - 1) * 0.35; card.castShadow = true; nk.add(card);
   });
 
   // TWO cream bouclé armchairs — one near (toward camera), one far (toward the arc),
@@ -1490,7 +1496,7 @@ function buildConsultationNook(cx, cz) {
       const leg = new THREE.Mesh(new THREE.CylinderGeometry(0.02, 0.015, 0.36, 8), woodDark);
       leg.position.set(lx, 0.18, lz); leg.castShadow = true; g.add(leg);
     });
-    scene.add(g);
+    nk.add(g);
     addContactShadow(chx, chz, 0.7, 0.7, 0.6);
   };
   // Chair toward the camera (faces the arc, back to viewer) + chair on the far side.
diff --git a/public/js/viewmodes.js b/public/js/viewmodes.js
index d67b466..676866d 100644
--- a/public/js/viewmodes.js
+++ b/public/js/viewmodes.js
@@ -278,6 +278,7 @@ function boot() {
         }
         // Reveal the seated set + table (idempotent) and park the over-the-shoulder camera.
         if (QH.setTableSeatVisible) QH.setTableSeatVisible(true);
+        if (window._qhNookGroup) window._qhNookGroup.visible = false;  // hide the side nook so only the centre table shows
         setWingDeg(0);
         parkTableCamera();
         // A table-mode click handler owns board selection: because parkTableCamera() locks
@@ -318,6 +319,7 @@ function boot() {
         hideSampleTable();
         if (tableClickHandler) { window.removeEventListener('click', tableClickHandler, true); tableClickHandler = null; }
         if (QH.setTableSeatVisible) QH.setTableSeatVisible(false);
+        if (window._qhNookGroup) window._qhNookGroup.visible = true;   // restore the side nook when leaving table view
       }
     }
   };

← 90fe8f0 showroom: boot = first-person user standing in the doorway a  ·  back to Quadrille Showroom  ·  auto-save: 2026-07-01T09:10:58 (1 files) — public/js/dock.js e034910 →