feat(visualizer): R2 lava tuning — flat fluid, melt, up+out throw, heat-driven turbulence, waveform-width knob

This commit is contained in:
daniel-c-harvey
2026-06-16 12:48:17 -04:00
parent 09309630cb
commit a64a5598ae
4 changed files with 283 additions and 119 deletions
@@ -27,33 +27,42 @@ public sealed class MixVisualizerControlState
/// </summary>
public const double DefaultVisibleSeconds = 10.0;
// R2 TEMP (Phase 10 reframe Wave R2): the three controls below are re-routed to the new
// R2 TEMP (Phase 10 reframe Wave R2): the FOUR controls below are re-routed to the new
// lava physics for Daniel's in-browser test — the JS handle setters map them as:
// Bubblyness → lava GRAVITY, Detach → lava HEAT, ColorShiftSpeed → COLLISION STRENGTH.
// The defaults are bumped so the lava looks ALIVE on open (heat non-zero). Wave R4
// replaces this with the proper six-knob set + its own typed properties. Keep these
// Bubblyness → lava GRAVITY, Detach → lava HEAT, ColorShiftSpeed → COLLISION STRENGTH,
// Resolution (VisibleSeconds knob) → WAVEFORM WIDTH (see MixVisualizerControls.razor).
// The defaults are tuned to Daniel's sweet spot (~20% gravity, ~100% heat). Wave R4
// replaces this with the proper seven-knob set + its own typed properties. Keep these
// mirrored to the DEFAULT_* anchors in MixVisualizer.ts, as the existing sync discipline.
/// <summary>
/// Default GRAVITY dial (R2 temp; was bulge). Mirrors <c>DEFAULT_BUBBLYNESS</c> in MixVisualizer.ts.
/// Normalized [0,1]; 0 = near-weightless float, 1 = wax falls + settles fast.
/// Normalized [0,1]; 0 = near-weightless float, 1 = wax falls + settles fast. Tuned to Daniel's
/// ~20% sweet spot so the wax is buoyant-dominated and flows.
/// </summary>
public const double DefaultBubblyness = 0.5;
public const double DefaultBubblyness = 0.2;
/// <summary>
/// Default HEAT dial (R2 temp; was detach). Mirrors <c>DEFAULT_DETACH</c> in MixVisualizer.ts.
/// Normalized [0,1]; 0 = wax rests at the bottom (collision-only), 1 = many bubbles rising.
/// Non-zero default so the lamp is alive on open.
/// Normalized [0,1]; 0 = wax rests at the bottom (collision-only), 1 = lots of small turbulent
/// bubbles. Tuned to Daniel's ~100% sweet spot.
/// </summary>
public const double DefaultDetach = 0.45;
public const double DefaultDetach = 1.0;
/// <summary>
/// Default COLLISION-STRENGTH dial (R2 temp; was color-shift). Mirrors
/// <c>DEFAULT_COLOR_SHIFT_SPEED</c> in MixVisualizer.ts. Normalized [0,1]; 0 = soft shove,
/// 1 = hard elastic wall.
/// <c>DEFAULT_COLOR_SHIFT_SPEED</c> in MixVisualizer.ts. Normalized [0,1]; 0 = soft mush,
/// 1 = hard elastic throw.
/// </summary>
public const double DefaultColorShiftSpeed = 0.5;
/// <summary>
/// Default WAVEFORM-WIDTH dial (R2 temp; routed to the resolution/zoom knob this wave). Mirrors
/// <c>DEFAULT_WAVEFORM_WIDTH</c> in MixVisualizer.ts. Normalized [0,1]; 1 = full ribbon width
/// (prior look), lower narrows the band so the lava gets more room. Opens at full width.
/// </summary>
public const double DefaultWaveformWidth = 1.0;
/// <summary>Visible time-span in seconds (the resolution/zoom control). Reused as-is from 8.K.</summary>
public double VisibleSeconds { get; set; } = DefaultVisibleSeconds;
@@ -66,6 +75,12 @@ public sealed class MixVisualizerControlState
/// <summary>Gradient-morph rate, normalized [0,1]. Inert until Wave 3 consumes the uniform.</summary>
public double ColorShiftSpeed { get; set; } = DefaultColorShiftSpeed;
/// <summary>
/// Waveform width, normalized [0,1]. R2 TEMP: routed to the resolution/zoom knob for in-browser
/// testing (Wave R4 gives it its own knob and restores the resolution knob to VisibleSeconds).
/// </summary>
public double WaveformWidth { get; set; } = DefaultWaveformWidth;
/// <summary>
/// Raised whenever any control value changes. The visualizer bridge subscribes to push the
/// affected uniform(s). Mutators set the property then raise this; subscribers re-read the values.