prototype: the volume stays AT eleven through the whole build (#364)
The build no longer settles to a working rumble — level holds at 1.2 with the CRANKED shake multiplier and the strobing red LED for the whole building state, exactly like the snap. It comes down only when the space is ready: hard cut to silence + confetti.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+7
−7
prototypes/space-lever.html+7 −7
diff --git a/prototypes/space-lever.html b/prototypes/space-lever.html| index 2e18fa6..c4c8da9 100644 |
| --- a/prototypes/space-lever.html |
| +++ b/prototypes/space-lever.html |
| @@ -427,15 +427,15 @@ function paint() { |
| leds.forEach((led, i) => { |
| const on = i < lit; |
| led.className = "led" + (on ? " on-" + led.dataset.c : "") + |
| - (phase === "snap" && i === 10 ? " fury" : ""); |
| + ((phase === "snap" || phase === "build") && i === 10 ? " fury" : ""); |
| }); |
| } |
| // level drives shake + dust, mirroring dialPaint: silent below ~5, trembling by |
| -// 10, PAST 1.0 only at the snap — and a steady working rumble while building. |
| +// 10, PAST 1.0 at the snap — and it STAYS at eleven for the whole build (the |
| +// volume doesn't come down until the space is ready; then it cuts to silence). |
| function levelNow() { |
| - if (phase === "snap") return 1.2; |
| - if (phase === "build") return 0.85; // still loud in there — it's working |
| + if (phase === "snap" || phase === "build") return 1.2; |
| if (phase === "done") return 0; |
| const base = Math.max(0, (value - 5) / 6); // 0 at 5 … ~0.83 at 10 |
| return base + pressure * 0.25; // the hold adds strain |
| @@ -455,10 +455,10 @@ function tick(t) { |
| stepDust(level); |
| stepConfetti(dt); |
| - // Loudness shake on the whole card: CRANKED at the snap, easing to a steady |
| - // rumble while the space builds, cutting out the moment it's ready. |
| + // Loudness shake on the whole card: CRANKED at the snap and held there |
| + // through the whole build, cutting out the moment it's ready. |
| if (!reduced && level > 0) { |
| - const mult = phase === "snap" ? P.crank : 1; |
| + const mult = phase === "snap" || phase === "build" ? P.crank : 1; |
| const a = P.shake * level * mult; |
| card.style.transform = |
| `translate(${((Math.random() - .5) * 2 * a).toFixed(2)}px, ${((Math.random() - .5) * 2 * a).toFixed(2)}px)` + |