From f5d8a4f96be0de031429dfd9905560321ea592a1 Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Tue, 23 Jun 2026 09:58:43 -0700 Subject: [PATCH] feat(sim): collapse Dark/Light into one bipolar Mood dial; drop calibration UI The engine already models Dark/Light as the two poles of one signed axis (tone = (light - dark)/4, equal = neutral), so the simulator now exposes a single bipolar Mood dial (-4 dark .. 0 neutral .. +4 light) that maps onto dark/light in controls(). Removes the Calibration section entirely: mood_gain and overlay_gain were always-locked 1.0 dev knobs (full dial = full effect), so they bake in as the DEFAULT_CALIBRATION constants and the sim sends no calibration. Experience panel is now just Left, Right, Mood. Engine/tests unchanged (DEFAULT_CALIBRATION already carries the 1.0 constants). Co-Authored-By: Claude Opus 4.8 (1M context) --- simulator/static/app.js | 15 +++++++-------- simulator/static/index.html | 9 +-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/simulator/static/app.js b/simulator/static/app.js index 4ccb7f6..ac01e1a 100644 --- a/simulator/static/app.js +++ b/simulator/static/app.js @@ -294,25 +294,24 @@ function renderScaleReadout() { } function controls() { + // One bipolar Mood dial (-4 dark .. 0 neutral .. +4 light) maps onto the engine's + // two poles. The calibration gains are pinned to their locked 1.0 (full dial = full + // effect), so the simulator sends no calibration — the server uses DEFAULT_CALIBRATION. + const mood = +$("mood").value; return { content: $("content").value, left: +$("left").value, right: +$("right").value, - dark: +$("dark").value, light: +$("light").value, + dark: mood < 0 ? -mood : 0, light: mood > 0 ? mood : 0, volume: 2, brightness: 2, }; } -function calibration() { - return { mood_gain: +$("mood_gain").value, overlay_gain: +$("overlay_gain").value, - dream_gain: 1.0 }; -} - let timer = null; async function update() { if (busy) return; const resp = await fetch("/api/alteration", { method: "POST", headers: { "content-type": "application/json" }, - body: JSON.stringify({ controls: controls(), calibration: calibration() }), + body: JSON.stringify({ controls: controls() }), }); if (!resp.ok) { readout.textContent = "invalid: " + resp.status; return; } const data = await resp.json(); @@ -422,7 +421,7 @@ async function main() { try { initPaint(); } catch (e) { paintOK = false; paint.style.display = "none"; showError("WebGL init: " + e.message); } await loadData(); renderScaleReadout(); - for (const id of ["content", "left", "right", "dark", "light", "mood_gain", "overlay_gain"]) { + for (const id of ["content", "left", "right", "mood"]) { $(id).addEventListener("input", debounced); } $("zoom-in").addEventListener("click", () => advance(1)); diff --git a/simulator/static/index.html b/simulator/static/index.html index bc2c0c7..986bef1 100644 --- a/simulator/static/index.html +++ b/simulator/static/index.html @@ -48,16 +48,9 @@ Experience knobs (0–4) - - + -
- Calibration - - -

Gains, not effects: mood gain scales the Dark/Light grade, overlay gain the Left HUD & affect words. Turn those knobs up first or these do nothing.

-
RenderPlan readout