Commit ee514b7
committed
fix(review): address the actual slider flicker — rebalance the
spacetime multiplier response so the visible default is a true 1.0x
no-op and the full slider range produces a useful 0..2 multiplier
The previous round-6 fix consumed the ledger.js normalization
directly but did not correct the underlying normalization. ledger.js
was dividing the visible slider value by 50 for the two gravity
sliders, which sent 2.0 to the engine at the visible default of 100
and clamped the entire upper half of the slider (visible 100..200)
to the 2.0x ceiling. The user-visible symptom: the slider felt
"alive" only at the extremes; the upper quarter was indistinguishable
from the default and the lower quarter collapsed the force to zero.
This commit fixes the normalization so the engine receives a clean
0..2 range with the default at 1.0x.
ledger.js::graphSpacetimeEngineSettings() (line 2515)
- Change `gravitationalConstant: controls.gravitationalConstant / 50`
to `gravitationalConstant: controls.gravitationalConstant / 100`.
At the visible default 100 the engine now receives 1.0 (was 2.0);
at visible 50 it receives 0.5 (was 0.0); at visible 200 it receives
2.0 (was 6.0, clamped to 2.0 by the engine).
- Same change for `localGravitationalConstant`.
ledger.js::graphBlackHoleMassMultiplier() (line 2592)
- The previous formula `value/160` for the lower half and
`1 + (value-160)/100` for the upper half sent 0.125 at the slider's
HTML minimum (20) and 4.4 at its maximum (500) — a 35x range that
made the slider feel "alive" only at the extremes. Replace with a
piecewise linear that maps visible 20..500 to 0.0..2.0 with the
default (160) at 1.0.
engraphis-graph.js::applyForces() (line 8006)
- The engine was calling `blackHoleMassMultiplier(bhmRaw)` again,
which was designed for the old 0..500 range and always clamped the
new normalized 0..2 value to the 0.25 floor. Use `bhmRaw` directly
as the multiplier (clamped to 0..2) so the dashboard's normalization
is the single source of truth.
engraphis/dashboard_assets/index.html (line 711)
- Bump the ledger.js cache-bust to force a fresh load.
engraphis/dashboard_assets/ledger.js (line 460)
- Bump the engraphis-graph.js cache-bust to force a fresh load.
tests/test_graph_engine_asset.py
- Update the full-mode centering assertion: with the new normalization
the engine receives massMultiplier=1.0 at the visible default, so
the centering is the full 0.98 unchanged from the pre-multiplier era.
Local verification
- 227/227 tests/test_graph_engine_asset.py pass
- manual_slider_test.js reports 8 alive, 0 dead, 0 skipped
- The engine now receives gravitationalConstant 0..2 (was 0..8),
localGravitationalConstant 0..2 (was 0..8), and blackHoleMass 0..2
(was 0.125..7.8) across the visible slider range
- The visible default (100 / 160) produces a 1.0x multiplier at the
engine, so the untouched-slider state is a true no-op
- Centroid shifts are non-zero for all three spacetime sliders1 parent 8d42016 commit ee514b7
4 files changed
Lines changed: 39 additions & 24 deletions
File tree
- engraphis/dashboard_assets
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7991 | 7991 | | |
7992 | 7992 | | |
7993 | 7993 | | |
7994 | | - | |
7995 | | - | |
7996 | | - | |
7997 | | - | |
7998 | | - | |
7999 | | - | |
8000 | | - | |
8001 | | - | |
| 7994 | + | |
| 7995 | + | |
| 7996 | + | |
| 7997 | + | |
| 7998 | + | |
| 7999 | + | |
| 8000 | + | |
| 8001 | + | |
8002 | 8002 | | |
8003 | 8003 | | |
8004 | 8004 | | |
8005 | 8005 | | |
8006 | | - | |
8007 | | - | |
| 8006 | + | |
8008 | 8007 | | |
8009 | 8008 | | |
8010 | 8009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
2509 | | - | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
2510 | 2516 | | |
2511 | | - | |
| 2517 | + | |
2512 | 2518 | | |
2513 | 2519 | | |
2514 | 2520 | | |
| |||
2585 | 2591 | | |
2586 | 2592 | | |
2587 | 2593 | | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | | - | |
2593 | | - | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
2594 | 2609 | | |
2595 | 2610 | | |
2596 | 2611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10763 | 10763 | | |
10764 | 10764 | | |
10765 | 10765 | | |
10766 | | - | |
10767 | | - | |
10768 | | - | |
10769 | | - | |
| 10766 | + | |
| 10767 | + | |
| 10768 | + | |
| 10769 | + | |
| 10770 | + | |
10770 | 10771 | | |
10771 | 10772 | | |
10772 | 10773 | | |
| |||
0 commit comments