- WEATHER_DENSITY bumped: sunny 0.20->0.55, cloudy 0.70->0.85, night 0.45->0.65. Stormy stays at 1.0 (already maxed). Even 'sunny' now has visible cloud structure, not just clear sky. - clouds3d: add a second fBm layer at 4x frequency for fine detail, blended at 18% into the base. Combined with the tighter smoothstep (0.24 -> 0.18) the cloud silhouettes have more interesting edges instead of soft blob shapes. - Same density bump applied to clouds2d so swapping renderers doesn't change the visual weather. - config.renderer: clouds2d -> clouds3d (user request)
67 lines
2.8 KiB
JavaScript
67 lines
2.8 KiB
JavaScript
/*
|
||
* 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 - Moment.js-compatible format string for the clock.
|
||
* debug - If 1, the right-side debug panel is shown.
|
||
* units - Object with 'temperature' ('C' or 'F').
|
||
* renderer - Background renderer: 'vanta' (default, GPU 3D volumetric
|
||
* raymarched clouds via three.js), 'clouds2d' (lightweight
|
||
* WebGL fragment shader, 2D fBm scrolling), or 'clouds3d'
|
||
* (volumetric raymarcher with camera fly-through).
|
||
* 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.
|
||
* 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).
|
||
*
|
||
* Time format tokens (subset):
|
||
* YYYY 4-digit year (2026)
|
||
* YY 2-digit year (26)
|
||
* MMMM full month name (October)
|
||
* MM month with leading zero (10)
|
||
* DD day with leading zero (07)
|
||
* HH 24-hour hour with zero (18)
|
||
* hh 12-hour hour with zero (06)
|
||
* mm minute with leading zero (14)
|
||
* ss second with leading zero (25)
|
||
* a am/pm lowercase (pm) - long form
|
||
* A AM/PM uppercase (PM) - long form
|
||
*/
|
||
window.CONFIG = {
|
||
theme: 'ash',
|
||
language: 'en',
|
||
timeFormat: 'DD. MMMM, YYYY ‒ HH:mm:SS',
|
||
debug: 1,
|
||
units: {
|
||
temperature: 'C'
|
||
},
|
||
renderer: 'clouds3d', // 'vanta', 'clouds2d', or 'clouds3d'
|
||
location: {
|
||
// Latitude and longitude for sun/moon calculations
|
||
// Default: Passau, Germany
|
||
lat: 48.5667,
|
||
lon: 13.4319
|
||
},
|
||
weatherSim: false,
|
||
weatherSimInterval: 30000,
|
||
};
|
||
|
||
// 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'
|
||
}; |