solargod/js/config.js
monsterrobotparty b42473a055 🔭 review: post-merge integration — sbdb_lookup into CONFIG.proxy, era-aware BC dates in lib formatters (fable)
Merged suite: 21/21 gates in-browser incl. NEO real-orbit (err 1.16%),
Jupiter@1000BC Δ0.004 AU, 2b-proof. Deep-time readout now '1000 BC-01-15'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 10:32:38 +10:00

83 lines
2.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// SOLARGOD configuration — every scale constant, camera default, rate preset and
// tunable in one place. Feed paths are RELATIVE so the app works at "/" (dev) and
// under a subpath (prod). Never introduce a leading-slash path.
export const CONFIG = {
proxy: {
horizons: 'proxy/horizons',
sbdb: 'proxy/sbdb',
sbdbLookup: 'proxy/sbdb_lookup',
cad: 'proxy/cad',
},
// Clock validity = Table 1 range. Scrubbing clamps here (brief §2). Deep-time
// (EPOCH toggle, &e=1) swaps min/maxMs to the deep bounds below — main.js does
// the swap at boot, before the clock inits. JS Date handles astronomical years.
time: {
minMs: Date.UTC(1800, 0, 1),
maxMs: Date.UTC(2050, 0, 1),
deepMinMs: Date.UTC(-2999, 0, 1), // 3000 BC (Table 2a extended range)
deepMaxMs: Date.UTC(2999, 11, 31), // 3000 AD
liveThresholdSec: 60, // |sim wall| ≤ 60 s at 1× → LIVE
},
// The view transform (scale.js). r_view = K · r_AU^P, with P animating between
// P_mega (0.4) and P_true (1.0). K stays constant so only P moves (brief §4).
scale: {
K: 9.0,
P_mega: 0.4,
P_true: 1.0,
transitionMs: 2500,
// Body draw radius = (r_km / AU_KM) · K · E. Sun gets its own E or it swallows
// Mercury. HUD slider swaps planetE between presets.
planetE: 1200,
sunE: 60,
ePresets: [1, 100, 1200],
// Moon local compression around parent (MEGA):
// d_view = R_parent_draw · (base + k · log10(1 + d_km / R_parent_km)).
moonBase: 1.8,
moonK: 1.2,
},
camera: {
fov: 55,
near: 0.001,
far: 1e12,
focusDistanceFactor: 6, // settle at ~6× target draw radius
flightMs: 2000,
startFocus: 'sun',
minDistance: 0.02,
},
// Rate presets in sim-seconds per wall-second (magnitude; sign via reverse btn).
rates: [
{ label: '1×', value: 1 },
{ label: '1 min/s', value: 60 },
{ label: '1 hr/s', value: 3600 },
{ label: '1 day/s', value: 86400 },
{ label: '1 wk/s', value: 604800 },
{ label: '1 mo/s', value: 2629800 }, // 30.4375 d
{ label: '1 yr/s', value: 31557600 }, // 365.25 d
{ label: '1 decade/s', value: 315576000 }, // 10 · 365.25 d — deep-time travel
{ label: '1 century/s', value: 3155760000 }, // 100 · 365.25 d
],
defaultRateIndex: 3, // 1 day/s
textures: {
path: 'assets/textures/',
skybox: '2k_stars_milky_way.jpg',
},
// Orbit paths rebuild only when |ΔT| exceeds this (centuries) or scale changes.
orbitRebuildCy: 0.1,
orbitSamples: 512,
useExtendedRange: false, // default (near mode); main.js flips it on for &e=1 deep time
colors: {
accent: '#d9a441', // brass
orbit: 0x3a4a63,
orbitFocus: 0xd9a441,
},
};