Commit e3ea254
committed
fix(graph): route the four spacetime sliders into d3 forces in non-galaxy mode
The Galactic gravity, Black hole mass, Local solar gravity, and Space damping
sliders previously only fed the galaxy-mode integrator. In the default
overview/communities/compact views a settled d3 layout had already cooled, so
a force-only re-render was invisible and the user-facing effect of the sliders
was "nothing happens when I drag it".
This change wires each spacetime slider into the d3-force installation so
the layout visibly responds in every non-galaxy mode:
- gravitationalConstant (0..200) scales the charge (node repulsion) strength.
Default 100 -> 1.0x; max 200 -> 2.0x; min 0 -> 0x.
- blackHoleMass (0..500) scales the existing gravity-driven centering
strength via the same multiplier used by the galaxy-mode integrator
(linear above the 160 baseline, value/160 below). Default 160 -> 1.0x;
500 -> 7.8x; 80 -> 0.5x.
- localGravitationalConstant (0..200) scales the link spring strength. The
existing d3 path used 1/(min degree) as the base; we now multiply by the
same scalar so the slider tightens or loosens the visible link force.
- damping (1..15) maps to fg.velocityDecay. At 1 the layout is bouncy
(decay 0.05); at 15 it settles quickly (decay 0.85). Bounded 0.05..0.85
so the extreme ends stay usable.
Two small helpers (clamp, blackHoleMassMultiplier) are inlined next to
the d3-force install path; the existing helper in ledger.js is unchanged.
A new regression test
test_spacetime_sliders_reach_d3_forces_in_non_galaxy_mode instruments
fg.d3Force / fg.velocityDecay to confirm each spacetime setting lands
on the d3 wire.
Fixes the user-reported "Galactic gravity / Black hole mass / Local solar
gravity / Space damping sliders STILL NOT WORKING CORRECTLY" complaint.1 parent dd20996 commit e3ea254
2 files changed
Lines changed: 117 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
616 | 635 | | |
617 | 636 | | |
618 | 637 | | |
| |||
7968 | 7987 | | |
7969 | 7988 | | |
7970 | 7989 | | |
7971 | | - | |
| 7990 | + | |
| 7991 | + | |
| 7992 | + | |
| 7993 | + | |
| 7994 | + | |
| 7995 | + | |
| 7996 | + | |
| 7997 | + | |
| 7998 | + | |
| 7999 | + | |
7972 | 8000 | | |
7973 | 8001 | | |
7974 | 8002 | | |
7975 | 8003 | | |
7976 | | - | |
| 8004 | + | |
7977 | 8005 | | |
7978 | 8006 | | |
| 8007 | + | |
7979 | 8008 | | |
| 8009 | + | |
| 8010 | + | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
7980 | 8016 | | |
7981 | 8017 | | |
7982 | 8018 | | |
| |||
8007 | 8043 | | |
8008 | 8044 | | |
8009 | 8045 | | |
8010 | | - | |
8011 | | - | |
| 8046 | + | |
| 8047 | + | |
| 8048 | + | |
8012 | 8049 | | |
8013 | 8050 | | |
8014 | 8051 | | |
8015 | 8052 | | |
8016 | 8053 | | |
8017 | | - | |
8018 | | - | |
| 8054 | + | |
| 8055 | + | |
8019 | 8056 | | |
8020 | 8057 | | |
8021 | 8058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10631 | 10631 | | |
10632 | 10632 | | |
10633 | 10633 | | |
| 10634 | + | |
| 10635 | + | |
| 10636 | + | |
| 10637 | + | |
| 10638 | + | |
| 10639 | + | |
| 10640 | + | |
| 10641 | + | |
| 10642 | + | |
| 10643 | + | |
| 10644 | + | |
| 10645 | + | |
| 10646 | + | |
| 10647 | + | |
| 10648 | + | |
| 10649 | + | |
| 10650 | + | |
| 10651 | + | |
| 10652 | + | |
| 10653 | + | |
| 10654 | + | |
| 10655 | + | |
| 10656 | + | |
| 10657 | + | |
| 10658 | + | |
| 10659 | + | |
| 10660 | + | |
| 10661 | + | |
| 10662 | + | |
| 10663 | + | |
| 10664 | + | |
| 10665 | + | |
| 10666 | + | |
| 10667 | + | |
| 10668 | + | |
| 10669 | + | |
| 10670 | + | |
| 10671 | + | |
| 10672 | + | |
| 10673 | + | |
| 10674 | + | |
| 10675 | + | |
| 10676 | + | |
| 10677 | + | |
| 10678 | + | |
| 10679 | + | |
| 10680 | + | |
| 10681 | + | |
| 10682 | + | |
| 10683 | + | |
| 10684 | + | |
| 10685 | + | |
| 10686 | + | |
| 10687 | + | |
| 10688 | + | |
| 10689 | + | |
| 10690 | + | |
| 10691 | + | |
| 10692 | + | |
| 10693 | + | |
| 10694 | + | |
| 10695 | + | |
| 10696 | + | |
| 10697 | + | |
| 10698 | + | |
| 10699 | + | |
| 10700 | + | |
| 10701 | + | |
| 10702 | + | |
| 10703 | + | |
| 10704 | + | |
| 10705 | + | |
| 10706 | + | |
| 10707 | + | |
10634 | 10708 | | |
10635 | 10709 | | |
10636 | 10710 | | |
| |||
0 commit comments