|
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 | | - /* Bumped from 1.24 to 1.5 so the orbital-radius response is more visible. */ |
328 | | - const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.5; |
| 321 | + const GALAXY_ORBITAL_RADIUS_MAXIMUM = 1.24; |
329 | 322 | function galaxyOrbitalSpeedMultiplier(setting) { |
330 | 323 | const raw = Number(setting); |
331 | 324 | const value = Number.isFinite(raw) |
|
450 | 443 | the integrator. */ |
451 | 444 | const GALAXY_REHEAT_STEPS = 0; |
452 | 445 | const GALAXY_REHEAT_LARGE_STEPS = 0; |
453 | | - /* Bumped from 0.00005 to 0.0005 — the damping slider (1..15) now has visibly stronger |
454 | | - effect: at slider=1 the per-tick velocity multiplier is 0.0005; at slider=15 it climbs |
455 | | - to 0.0075 (50% stronger than the previous 0.0015 cap). */ |
456 | | - const GALAXY_VELOCITY_DECAY = 0.0005; |
| 446 | + const GALAXY_VELOCITY_DECAY = 0.00005; |
457 | 447 | /* Developer-facing spacetime controls are normalized multipliers around the calibrated |
458 | 448 | dashboard physics. Keeping them separate from the established Gravity/Link controls makes |
459 | 449 | the advanced panel reversible and avoids changing saved-layout semantics. */ |
|
2507 | 2497 | const explicitGlobal = anchor.anchor_role === 'global'; |
2508 | 2498 | const gravitationalConstantMultiplier = galaxyPhysicsMultiplier(opts.gravitationalConstant, |
2509 | 2499 | 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 | 2500 | const gravitationalConstant = galaxyBlackHoleGravityConstant(opts.gravity, explicitGlobal) |
2515 | | - * gravitationalConstantMultiplier * blackHoleMassMultiplier; |
| 2501 | + * gravitationalConstantMultiplier * Math.sqrt(Math.max(0.25, blackHoleMassMultiplier)); |
2516 | 2502 | const accelerationCap = Math.max(0, Number.isFinite(Number(opts.accelerationCap)) |
2517 | 2503 | ? Number(opts.accelerationCap) |
2518 | 2504 | : 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 | 2505 | * Math.max(0.25, Math.min(8, |
2523 | | - gravitationalConstantMultiplier * Math.max(0.25, blackHoleMassMultiplier)))); |
| 2506 | + gravitationalConstantMultiplier * Math.max(1, blackHoleMassMultiplier)))); |
2524 | 2507 | const haloVelocitySquared = haloMass > 0 |
2525 | 2508 | ? gravitationalConstant * haloMass / (Math.SQRT2 * haloScale) : 0; |
2526 | 2509 | const model = { |
|
5958 | 5941 | const tangentX = -unitY * phase.direction, tangentY = unitX * phase.direction; |
5959 | 5942 | const targetX = parent.x + unitX * targetRadius; |
5960 | 5943 | const targetY = parent.y + unitY * targetRadius; |
5961 | | - const targetRelativeSpeed = galaxyRelativeSpeedBudget(parent, absoluteSpeedLimit, |
5962 | | - baseSpeed * orbitalSpeed); |
5963 | 5944 | const targetVx = (Number.isFinite(parent.vx) ? parent.vx : 0) |
5964 | 5945 | + tangentX * phaseSpeed; |
5965 | 5946 | const targetVy = (Number.isFinite(parent.vy) ? parent.vy : 0) |
|
8895 | 8876 | a constant gravity amount. */ |
8896 | 8877 | const diagnosticMass = galaxyPhysicsMultiplier(state.settings.blackHoleMass, |
8897 | 8878 | GALAXY_BLACK_HOLE_MASS_MULTIPLIER, 16); |
8898 | | - /* Linear in diagnosticMass (was sqrt) so the diagnostic matches the new linear field |
8899 | | - equation in galaxyBlackHoleField. */ |
8900 | 8879 | const effectiveGravity = galaxyBlackHoleGravityConstant(state.settings.gravity, true) |
8901 | 8880 | * galaxyPhysicsMultiplier(state.settings.gravitationalConstant, |
8902 | 8881 | GALAXY_GRAVITATIONAL_CONSTANT_MULTIPLIER, 8) |
8903 | | - * diagnosticMass; |
| 8882 | + * Math.sqrt(Math.max(0.25, diagnosticMass)); |
8904 | 8883 | return Object.assign(galaxyMotionDiagnostics(data.nodes || []), { |
8905 | 8884 | mode: state.settings.mode, |
8906 | 8885 | running, |
|
10770 | 10749 | galaxyBlackHoleGravityConstant, galaxyBlackHoleGravitySetting, |
10771 | 10750 | galaxyCarrierTargetSpeed, galaxyAuthoredCarrierTargetSpeed, |
10772 | 10751 | galaxyBlackHoleSpinAngle, advanceGalaxyBlackHoleSpin, |
| 10752 | + galaxyGlobalGravityFloorSetting: GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING, |
| 10753 | + galaxyStellarGravityFloorSetting: GALAXY_STELLAR_GRAVITY_FLOOR_SETTING, |
10773 | 10754 | galaxyLocalGravityConstant, |
10774 | 10755 | galaxyLocalGravityMultiplier, |
10775 | 10756 | galaxyStellarGravityConstant, galaxyFallbackStellarGravityConstant, |
|
0 commit comments