V.1 — cut the CDN tether. Vendored the exact pinned files the importmap used (three.module.js r170 + OrbitControls + CSS2DRenderer, ~1.29 MB) under vendor/three/, mirroring the package layout so the addons' bare `import from 'three'` resolves. Import graph verified shallow (addons import only 'three'; the bundle is self-contained). Both importmaps (index.html, verify.html) now point at ./vendor/three/… — zero jsdelivr/CDN URLs remain. MIT LICENSE + PROVENANCE.txt retained. V.2 — open deep time. EPOCH toggle (1800–2050 / 3000 BC–3000 AD) next to MEGA/TRUE; deep mode is a hash-carried page mode (&e=1) read before ephem/clock init → ephem.setExtendedRange(true) + CONFIG.time swaps to the deep bounds. Timeline end labels + scrub tooltip now read from CONFIG (were hardcoded 1800/2050). Toggle serializes current view and reloads with the flipped e token (orbit paths + element resolution are baked per-session). Appended 1 decade/s and 1 century/s rates. Hash e token added to applyHash/serializeHash. V.3 — appended verify gates (PERIHELION-V): Jupiter @1000 BC (extended 2a+2b) vs live Horizons barycenter tol 0.15 AU (Δ 0.0041); Mercury @2500 tol 0.02 AU (Δ 3e-5); Table 2b M-correction proven live (zeroing it worsens Jupiter@1000BC by 0.0214 AU). Core 13 gates untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
82 lines
2.6 KiB
JavaScript
82 lines
2.6 KiB
JavaScript
// 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',
|
||
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,
|
||
},
|
||
};
|