[object Object]

← back to Quadrille Showroom

fix Wing° control: VIEW_OPEN was set by the slider but never read — now rakes the focused open board live (+re-ease nudge)

c66a5873b069c7164647b1a4820eb2b25d5bf4d7 · 2026-06-30 18:47:13 -0700 · Steve Abrams

Files touched

Diff

commit c66a5873b069c7164647b1a4820eb2b25d5bf4d7
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jun 30 18:47:13 2026 -0700

    fix Wing° control: VIEW_OPEN was set by the slider but never read — now rakes the focused open board live (+re-ease nudge)
---
 public/js/showroom.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/public/js/showroom.js b/public/js/showroom.js
index 6b7278a..6a58d1a 100644
--- a/public/js/showroom.js
+++ b/public/js/showroom.js
@@ -3089,6 +3089,12 @@ function updateBooks(dt) {
   if (isRestingOnly) {
     const rake = openPivot.userData.rake || (73 * Math.PI / 180);
     restFlip = Math.max(0, Math.min(1, (OPEN_ANGLE_DEG * Math.PI / 180) / rake));
+  } else if (openPivot && openPivot === focusedWing) {
+    // Wing° slider (VIEW_OPEN, radians) rakes the FOCUSED open board off flat:
+    // 0°=flat/dead-on (flip 1, the hero), higher = raked back toward closed.
+    // Previously VIEW_OPEN was set by the slider but never read → slider did nothing.
+    const rake = openPivot.userData.rake || (73 * Math.PI / 180);
+    restFlip = Math.max(0, Math.min(1, (rake - VIEW_OPEN) / rake));
   }
   const moved = QHRack.flipUpdate(wingBoards, openPivot, dt, restFlip);
   // SHADOW REBAKE BUDGET: don't rebake the (2 lights × 238-mesh) shadow maps EVERY
@@ -3631,9 +3637,12 @@ function initHUD() {
     if (angVal) angVal.textContent = ang.value + '°';
     ang.addEventListener('input', () => {
       const deg = parseInt(ang.value) || 0;
-      VIEW_OPEN = deg * Math.PI / 180;            // updateBooks eases open boards to it live
+      VIEW_OPEN = deg * Math.PI / 180;            // updateBooks rakes the focused open board to it live
       localStorage.setItem('qh_view_deg', deg);
       if (angVal) angVal.textContent = deg + '°';
+      // Nudge the focused board out of its settled state so flipUpdate re-eases to
+      // the new Wing° target this frame (flipUpdate only moves boards whose flip != target).
+      if (focusedWing && window._requestShadowUpdate) window._requestShadowUpdate(6);
     });
   }
 

← 4bb3eba chore: lint, refactor, v1.2.0 (session close)  ·  back to Quadrille Showroom  ·  add boot-walk + carousel screen-recording harnesses 6c84fb0 →