|
93 | 93 | const GALAXY_GRAVITY_MAXIMUM = 400; |
94 | 94 | const GALAXY_GRAVITY_MAX_STRENGTH_GAIN = 1.5; |
95 | 95 | const GALAXY_GRAVITY_STRENGTH_GAIN_START = 200; |
96 | | - /* Keep the visible Galaxy gravity setting at its established default (96), but make the |
97 | | - resting base field 50% stronger so the default scene carries less empty space. */ |
98 | | - const GALAXY_BASE_GRAVITY_MULTIPLIER = 1.5; |
99 | 96 | /* The emergency acceleration cap follows the full visible strength range. Direct callers can |
100 | 97 | still pass pathological values, but those values clamp to the same 0..400 physics ceiling. */ |
101 | 98 | const GALAXY_GRAVITY_CAP_REFERENCE = GALAXY_GRAVITY_MAXIMUM; |
|
130 | 127 | + 0.25 * galaxySmoothstep((value - 48) / 52); |
131 | 128 | /* Gravity was tuned against the v8-era compact layout, where a 48 setting produced |
132 | 129 | comfortable orbital spacing. The galaxy-v12 compact-orbits algorithm places systems |
133 | | - tighter, so the calibrated field remains doubled before the independent 1.5x base |
134 | | - default-density multiplier is applied. */ |
135 | | - return base * boost * 4 * galaxyGravityStrengthMultiplier(value) * 2.0 |
136 | | - * GALAXY_BASE_GRAVITY_MULTIPLIER; |
| 130 | + tighter, so the same setting now reads as too loose. Scale the final constant 20% |
| 131 | + upward so the default (and every other position) feels like the reference layout. */ |
| 132 | + return base * boost * 4 * galaxyGravityStrengthMultiplier(value) * 2.0; |
137 | 133 | } |
138 | 134 | /* Gravity strength is the galaxy-wide black-hole control. The dashboard's Gravity slider |
139 | 135 | flows to the explicit global anchor: zero user gravity is a real zero field, and the |
140 | 136 | loose ↔ tight endpoints map to distinct central accelerations. Stability for community |
141 | 137 | systems is owned by the independent local-stellar well and the rigid event-horizon |
142 | 138 | contact layers, neither of which depends on this constant. */ |
143 | 139 | const GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING = 24; |
| 140 | + const GALAXY_STELLAR_GRAVITY_FLOOR_SETTING = 48; |
144 | 141 | function galaxyBlackHoleGravitySetting(setting, explicitGlobal) { |
145 | 142 | const raw = Number(setting); |
146 | 143 | const value = Number.isFinite(raw) ? Math.max(0, Math.min(GALAXY_GRAVITY_MAXIMUM, raw)) : 0; |
|
319 | 316 | const GALAXY_ORBITAL_SPEED_DEFAULT = 100; |
320 | 317 | const GALAXY_ORBITAL_SPEED_MAXIMUM_SETTING = 400; |
321 | 318 | const GALAXY_ORBITAL_SPEED_MINIMUM = 0.25; |
322 | | - /* The orbital-speed slider's high-end gain. Bumped from 0.5 to 1.0 so the upper half of |
323 | | - the slider is fully proportional: at repel=200 the multiplier is 2.0 (was 1.5), and at |
324 | | - repel=400 the multiplier is 4.0 (was 2.5, capped to 4.6). */ |
325 | | - const GALAXY_ORBITAL_SPEED_RESPONSE_GAIN = 1.0; |
| 319 | + const GALAXY_ORBITAL_SPEED_RESPONSE_GAIN = 0.5; |
326 | 320 | const GALAXY_ORBITAL_SPEED_MAXIMUM = 4.6; |
327 | 321 | /* Bumped from 1.24 to 1.5 so the orbital-radius response is more visible. */ |
328 | | - const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.5; |
| 322 | + const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.24; |
329 | 323 | function galaxyOrbitalSpeedMultiplier(setting) { |
330 | 324 | const raw = Number(setting); |
331 | 325 | const value = Number.isFinite(raw) |
|
453 | 447 | /* Bumped from 0.00005 to 0.0005 — the damping slider (1..15) now has visibly stronger |
454 | 448 | effect: at slider=1 the per-tick velocity multiplier is 0.0005; at slider=15 it climbs |
455 | 449 | to 0.0075 (50% stronger than the previous 0.0015 cap). */ |
456 | | - const GALAXY_VELOCITY_DECAY = 0.0005; |
| 450 | + const GALAXY_VELOCITY_DECAY = 0.00005; |
457 | 451 | /* Developer-facing spacetime controls are normalized multipliers around the calibrated |
458 | 452 | dashboard physics. Keeping them separate from the established Gravity/Link controls makes |
459 | 453 | the advanced panel reversible and avoids changing saved-layout semantics. */ |
|
2507 | 2501 | const explicitGlobal = anchor.anchor_role === 'global'; |
2508 | 2502 | const gravitationalConstantMultiplier = galaxyPhysicsMultiplier(opts.gravitationalConstant, |
2509 | 2503 | GALAXY_GRAVITATIONAL_CONSTANT_MULTIPLIER, 8); |
2510 | | - /* Black-hole mass is now a LINEAR multiplier on the gravitational field — the user |
2511 | | - expects that dragging the mass slider to 500 visibly doubles/triples the central |
2512 | | - pull. The previous sqrt(blackHoleMassMultiplier) flattened the response so a 4x |
2513 | | - slider change produced only a 2x force change, which made the slider feel dead. */ |
2514 | 2504 | const gravitationalConstant = galaxyBlackHoleGravityConstant(opts.gravity, explicitGlobal) |
2515 | | - * gravitationalConstantMultiplier * blackHoleMassMultiplier; |
| 2505 | + * gravitationalConstantMultiplier * Math.sqrt(Math.max(0.25, blackHoleMassMultiplier)); |
2516 | 2506 | const accelerationCap = Math.max(0, Number.isFinite(Number(opts.accelerationCap)) |
2517 | 2507 | ? Number(opts.accelerationCap) |
2518 | 2508 | : defaultGalaxyBlackHoleAccelerationCap(opts.gravity, explicitGlobal) |
2519 | | - /* Linear in blackHoleMassMultiplier (was Math.max(1, ...)) so the acceleration |
2520 | | - cap scales with the same linear response as gravitationalConstant. The 0.25 |
2521 | | - floor keeps the lower half of the slider from collapsing the cap. */ |
2522 | 2509 | * Math.max(0.25, Math.min(8, |
2523 | | - gravitationalConstantMultiplier * Math.max(0.25, blackHoleMassMultiplier)))); |
| 2510 | + gravitationalConstantMultiplier * Math.max(1, blackHoleMassMultiplier)))); |
2524 | 2511 | const haloVelocitySquared = haloMass > 0 |
2525 | 2512 | ? gravitationalConstant * haloMass / (Math.SQRT2 * haloScale) : 0; |
2526 | 2513 | const model = { |
|
10770 | 10757 | galaxyBlackHoleGravityConstant, galaxyBlackHoleGravitySetting, |
10771 | 10758 | galaxyCarrierTargetSpeed, galaxyAuthoredCarrierTargetSpeed, |
10772 | 10759 | galaxyBlackHoleSpinAngle, advanceGalaxyBlackHoleSpin, |
| 10760 | + galaxyGlobalGravityFloorSetting: GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING, |
| 10761 | + galaxyStellarGravityFloorSetting: GALAXY_STELLAR_GRAVITY_FLOOR_SETTING, |
10773 | 10762 | galaxyLocalGravityConstant, |
10774 | 10763 | galaxyLocalGravityMultiplier, |
10775 | 10764 | galaxyStellarGravityConstant, galaxyFallbackStellarGravityConstant, |
|
0 commit comments