Files
animated_wallpaper/config.js
T

214 lines
11 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.
/*
* Wallpaper background config.
*
* Properties:
* theme - Active palette theme. One of the keys in window.THEMES
* (default 'ash'). The matching CSS file is loaded at
* startup.
* language - UI / i18n language code (default 'en').
* timeFormat - Format string for the clock using the token set below
* (Moment.js-like names, own mini-formatter).
* debug - If 1, the right-side debug panel is shown.
* units - Object with 'temperature' ('C' or 'F').
* location - Geographic coordinates for sun/moon calculations. Used
* by SunCalc (https://github.com/mourner/suncalc). Object
* with 'lat' (latitude, -90 to +90) and 'lon' (longitude,
* -180 to +180). Positive lat = north, positive lon = east.
* Optionally add 'label' (string) to override the
* reverse-geocoded city name.
* Note: the height grid is axis-aligned (N up); terrain
* matches the square ground mosaic and straight flights
* (prefetch direction via #fetch=N). Heights: Copernicus
* DEM via terrarium tiles (z9, ~200 m).
* terrain - 3D ground from real elevation data. Object:
* enabled - true (default) / false = flat plane.
* exaggeration - vertical scale factor on the DEM
* (default 8; 1 would be physically
* true and nearly invisible at this
* horizontal scale).
* weatherSim - If true, ignore open-meteo and cycle through
* ['sunny','cloudy','stormy','night'] automatically every
* weatherSimInterval ms. Useful for A/B testing every
* theme without waiting on the API.
* weatherSimInterval - Sim cycle period in ms (default 30000).
* orbit - Figure-eight flight (Bernoulli lemniscate) around
* CONFIG.location instead of a straight drift. The
* eight's self-crossing sits exactly on the configured
* coordinate. Each time the aircraft crosses that point
* a new random orientation is picked and blended in
* over one lobe (spline through the crossing). Object:
* radiusKm - lobe tip reach from the centre in km
* (~13 km per tile at z11/48deg N).
* Clamped (~190 km) so tips + fog horizon
* fit inside the 43x43 tile mosaic.
* clockwise - travel direction along the eight.
* reorient - random re-aim at every crossing
* (default true; false keeps the bearing).
* Set to null (or remove) for the straight-line flight.
* fog - Ground fog / distance haze. Object with 'distanceKm'
* (visibility range at which terrain fully blends into
* a milky haze; default 120). false/0 disables fog.
* clouds - Vertical extent of the cloud deck in world units
* (1 unit = ~12.9 km at zoom 11; camera band 15-35 km,
* i.e. y ~ 1.16-2.70). Default puts the deck top (~11.6
* km) below the lowest flight altitude.
* tiles - All downloads (street tiles, elevation grid, last
* weather payload, geo label) live permanently in
* IndexedDB and are never re-fetched once cached; a
* warm cache = fully offline rendering. Set
* expireDays (number > 0) to re-fetch street tiles
* periodically (e.g. 90).
*
* Time format tokens (subset):
* YYYY 4-digit year (2026)
* MMMM full month name (October)
* MM month with leading zero (10)
* DD day with leading zero (07)
* HH 24-hour hour with zero (18)
* mm minute with leading zero (14)
* ss second with leading zero (25)
* a am/pm lowercase (pm)
* A AM/PM uppercase (PM)
* dddd full weekday name (lowercase!)
* Any other character is emitted verbatim.
*/
window.CONFIG = {
theme: 'ash',
language: 'en',
timeFormat: 'DD. MMMM, YYYY ‒ HH:mm:SS',
debug: 0,
units: {
temperature: 'C'
},
// Data attribution at the bottom of the info box (auto text based on
// the enabled layers). false = ausgeblendet.
credits: true,
// Internal 3D resolution scale (0.3..1, default 1). Lower values
// render the clouds/map shader at reduced resolution and upscale
// via CSS - use it if fps is low (GPU-bound) despite a quiet CPU.
renderScale: 1,
// WebGL scene frame cap (default 30; 0 = free-running/vsync). All
// scene motion is time-based, so the cap only changes smoothness.
maxFps: 30,
location: {
// Latitude and longitude for sun/moon calculations
// Passau (vorher: Muenchen 48.1374/11.5755, Innsbruck 47.2692/11.4041)
lat: 48.5667,
lon: 13.4319
},
weatherSim: false,
weatherSimInterval: 30000,
// Alles Downloads (Strassenkacheln, Hoehengitter, Wetter-JSON,
// Geo-Label) bleibt dauerhaft im IndexedDB — kein erneuter
// Download. expireDays (Tage, >0) reaktiviert periodisches
// Auffrischen der Strassenkacheln.
tiles: {
expireDays: null,
// true = Kachel-Raender + N/S + x/y-Koords in die Boden-Textur
// malen (Debug-Orientierung). Aus = saubere Karte.
debug: false
},
// Boden-Bildquelle: 'satellite' = ESRI World_Imagery (Luftbild, ohne
// Beschriftung), 'streets' = ESRI World_Street_Map (mit Ortsnamen).
// Beide dauerhaft gecacht (eigener Cache- Praefix pro Stil).
ground: {
style: 'satellite'
},
// Achterkurs um location (lat/lon), ueberschneidungspunkt genau auf
// der Koordinate. null/entfernen = gerade Flugbahn.
orbit: {
radiusKm: 60, // Lappenspitze: max. Abstand vom Zentrum
clockwise: true,
reorient: true, // Zufalls-Ausrichtung an jedem Kreuzungs-Durchflug
// Langsames vertikales Wogen innerhalb der Flugband 15-35 km:
// Mitte 25 km (~1.93 Welt-Einheiten), amp = halbes Band
// (10 km ~ 0.77); harte Klemme ueber/unter die Bandgrenzen.
// periodS Sekunden pro Zyklus, tilt = Reaktion der Kamera-Nase
// auf Steig-/Sinkrate. enabled: false = konstant 25 km.
altBob: { enabled: true, amp: 0.77, periodS: 90, tilt: 0.3 }
},
// Bodennebel: Distanz-Haze. distanceKm = Sichtweite bis vollständige
// Nebelsaettigung (false/0 = aus).
fog: {
distanceKm: 120
},
// 3D-Boden aus echten Hoehendaten (Copernicus DEM, terrarium-Kacheln).
// enabled: false = flache Ebene. exaggeration: vertikale Ueberhoehung
// (1 = real, unsichtbar; default 8). wireframe: true = Mesh-Kanten
// als orange Linien zusaetzlich einblenden (Debug).
// nightLights: NASA-VIIRS-Stadtlichter-Layer, der ab Sonnenuntergang
// ueber ~1 h in die Tageskarte geblendet wird (dunkler Boden,
// leuchtende Staedte). Einmaliger Fetch (~49 Kacheln), persistent
// gecacht. false = kein Lichtoverlay, nachts bleibt die normale
// Textur deutlich heller (nur sanft abgedimmt).
// carLights: fahrende Lichter auf Autobahnen (OSM/Overpass-Kurven,
// nachts additiv ueber dem Gelaende). JSON einmalig, persistent gecacht.
// cityLights: Siedlungslichter — OSM-Ortsknoten (city/town/village/
// hamlet) als leicht gelbliche Glow-Punkte, ab Daemmerung statisch;
// je groesser die Siedlung (place-Klasse + population-Tag), desto
// mehr und hellere Punkte. Eine Overpass-Abfrage, persistent gecacht.
// ---- Civil aviation (CONFIG.flights) ---------------------------------
// Low-poly jets (CC0 model, vendor/plane3d.js) with randomized target
// airports: the destination is rolled at every take-off (hubs weighted
// via wHub/wField/wStrip). Paths are gentle Bezier curves resampled to
// arc length (constant ground speed) flown as a full profile: take-off
// and climb, cruise, descent and landing, a short ground hold, then a
// fresh destination. By day sun-lit silhouettes; by night white
// strobing position lights with a red beacon. Contrails form above
// contrailStartKm on contrailChance of the aircraft and stay visible
// for contrailLifeS. All distances in km (world scale: 1 unit = one
// z11 tile ~ 12.9 km at 48.6 deg N).
flights: {
enabled: true,
altitudeKm: 14, // cruise altitude
climbKm: 100, // climb/descent run to/from cruise altitude
count: 84, // max simultaneous aircraft
speedKmh: 850, // mean ground speed
speedVar: 0.18, // +/- deviation (0..0.5)
minLegKm: 60, // shortest leg (no taxi hops)
holdMinS: 50, // ground hold at destination (min..max)
holdMaxS: 150,
wHub: 4, // destination weights: hub / airfield / strip
wField: 2,
wStrip: 1,
contrailChance: 0.6, // share of aircraft with a persistent trail
contrailStartKm: 6, // trail formation altitude
contrailLifeS: 300, // trail visibility duration
contrailWidthM: 310 // full trail width
},
terrain: {
enabled: true,
exaggeration: 8,
wireframe: true,
nightLights: false,
carLights: true,
cityLights: true
},
// Tagessimulation: true = 24h-Zyklus wird in cycleSeconds durchlaufen
// (Sonne steigt im Osten, Mittag im Sueden, Untergang im Westen).
// false = echte Sonnen-/Mondposition via SunCalc.
// fixedTime: 'HH:MM' (oder Zahl 0-24) = Sim-Uhr steht still auf
// dieser Tageszeit (bewegte Objekte, Wolken, Autos und Wetter-Sim
// laufen unaffected weiter); null/auskommentiert = Uhr laeuft.
// 20:00 = maximum Verkehrsaufkommen (Plateau 18:30-23:00, Dichte=1).
day: {
simulation: false,
cycleSeconds: 20,
fixedTime: null
},
// Wolkendecke in Welt-Einheiten (1 unit ~ 12.9 km bei Zoom 11;
// Flugband 15-35 km = y ~ 1.16-2.70). Oberkante unter dem Tiefpunkt.
clouds: {
top: 0.9,
bottom: -0.3
},
};
// List of available themes. The key is the theme id (used in config.theme),
// the value is the CSS file name. Add a new theme by adding a new entry here
// and dropping the corresponding CSS file in the same directory.
window.THEMES = {
'ash': 'ash.css',
'gruvbox': 'gruvbox.css',
'nord': 'nord.css'
};