Commit Graph
443 Commits
Author SHA1 Message Date
Richard Zink 468e66058e Fix clouds3d: move starField out of main() (GLSL syntax)
GLSL does not allow nested function definitions; the starField()
helper must live at top-level alongside hash3/noise3/fbm3.
2026-10-07 19:04:50 +02:00
Richard Zink ee821dd724 Airliner cockpit view + night stars
- Cruise altitude lowered to y=2.0 (just above cloud top at y=1.8)
- Look direction nearly level (rd.y ~ -0.05 at horizon line)
- Stars rendered as 3D hash-grid sphere, only above horizon and
  only when uDayProgress < 1 (i.e. at night). Subtle sin twinkle
  keeps them from looking like static dither.
2026-10-07 19:02:06 +02:00
Richard Zink e80d255d58 Fly mostly above the clouds with brief dips
Camera altitude is now driven by pow(sin,5) so the view stays at
y=2.6 most of the time and only briefly dips to y=0.9 to skim the
top of the cloud deck. Marching also skips the empty gap between
camera and cloud ceiling when looking down from above.
2026-10-07 18:57:55 +02:00
Richard Zink 433d743446 Tune clouds3d for low-end GPUs: 18 steps, 3 octaves
Reduce raymarch iterations from 28 to 18 and fBm octaves from
4 to 3 (with step size 0.55->0.85 to preserve cloud coverage).
Per-pixel cost drops by ~55% while visual density stays similar.
2026-10-07 18:56:40 +02:00
Richard Zink 0648676974 Add volumetric clouds3d renderer
Raymarches a horizontal cloud layer (28 steps, 4-octave 3D fBm).
Camera path is sinusoidal in altitude so the view dips into the
cloud deck at intervals for a 'fly through the edges' feel.
Density threshold from weather: sunny -> sparse, stormy -> overcast.
Renderer is selected via CONFIG.renderer ('clouds2d' or 'clouds3d').
2026-10-07 18:54:58 +02:00
Richard Zink 3812f80f40 Make clouds2d.js theme-agnostic
- Remove all hardcoded fallback hex/rgb values
- Skip draw until __currentPalette is published by parent
- applyWeatherTheme now also mixes cloudShadow (was dropped)
2026-10-07 18:53:15 +02:00
Richard Zink c6764fd534 Fix clouds2d: create own canvas element
The 2D WebGL renderer now creates its own <canvas> overlay inside
the target element, instead of expecting the target to already be a
canvas. This fixes 'canvas.getContext is not a function' when the
target is a <div>.
2026-10-07 18:49:42 +02:00
Richard Zink e8df75eebc Enable debug temporarily for diagnosis 2026-10-07 16:56:50 +02:00
Richard Zink d8e619e0c3 Add lightweight 2D WebGL cloud renderer as alternative to Vanta 2026-10-07 16:47:53 +02:00
Richard Zink a82d6cce3d Inline noise.png as base64 data URI to allow file:// access 2026-10-07 16:20:14 +02:00
Richard Zink fcf431470a Disable Vanta default texturePath so only our inline data:image is loaded 2026-10-07 16:15:49 +02:00
Richard Zink 8e05444cfb Add build.py: bundles all assets into a single standalone HTML 2026-10-07 16:12:16 +02:00
Richard Zink 3ccc3e4be7 Set webpage title to 'Background Vanta Clouds2' 2026-10-07 15:01:22 +02:00
Richard Zink 746a7cb615 Add README and MIT LICENSE 2026-10-07 15:00:38 +02:00
Richard Zink 965b813f5e Rename index.html to background.html; configure nginx to serve it as index 2026-10-07 14:59:09 +02:00
Richard Zink 3241721f2b Skip reverse-geocoding if CONFIG.location.label already set 2026-10-07 14:37:08 +02:00
Richard Zink 5c3a29a12e Display location label/coordinates right-aligned in weather widget 2026-10-07 14:35:10 +02:00
Richard Zink fd73c3ec1c Try browser geolocation for location with London fallback 2026-10-07 14:30:42 +02:00
Richard Zink 223d1a3d74 Use CONFIG.location.lat/lon for weather API requests 2026-10-07 14:27:53 +02:00
Richard Zink 80d15a6edd Document location field in config.js 2026-10-07 14:25:54 +02:00
Richard Zink 9dd76ebd9e Use lat/lon from CONFIG.location; hide debug panel when debug=0; remove street address 2026-10-07 14:22:02 +02:00
Richard Zink 518988251c Convert forecast temperatures based on CONFIG.units (slot + minmax) 2026-10-07 14:17:55 +02:00
Richard Zink 5e9ddd8590 Refresh weather display when debug units dropdown changes 2026-10-07 14:14:39 +02:00
Richard Zink 661542117c Support ss/SS case-insensitive; convert units based on CONFIG.units 2026-10-07 14:12:10 +02:00
Richard Zink d3ccd6f70d Set debug=0, language=de, timeFormat=DD. MMMM, YYYY T HH:mm:SS 2026-10-07 14:06:24 +02:00
Richard Zink 90b5cd2a78 Add vanta.clouds2.min.js for fallback 2026-10-07 14:02:06 +02:00
Richard Zink 7109e1b5a0 Vendor Vanta.js, three.js, suncalc locally for offline operation 2026-10-07 14:01:32 +02:00
Richard Zink eae8bf19a3 Add am/AM (a/A) token to formatDateTime; document in config.js 2026-10-07 13:58:17 +02:00
Richard Zink 1c6b2ffbbe Add white-space: pre to digital clock for line breaks 2026-10-07 13:54:42 +02:00
Richard Zink 305770154f Expand config.js docs with full examples and escape sequences 2026-10-07 13:51:33 +02:00
Richard Zink 39154a0311 Add 3-letter month short forms to i18n dictionary 2026-10-07 13:49:56 +02:00
Richard Zink b120779597 Add IT, ES, FR, RU to debug language dropdown 2026-10-07 13:41:06 +02:00
Richard Zink 1f3fbb3283 Add Italian, Spanish, French, Russian translations 2026-10-07 13:40:46 +02:00
Richard Zink 463fa773c8 Fix i18n: add 3-letter weekday/month short forms for DDD/MMM tokens 2026-10-07 13:39:17 +02:00
Richard Zink 8b5420c274 Fix: remove dot from MMM key lookup in formatDateTime 2026-10-07 13:34:53 +02:00
Richard Zink 66cc6d1939 Add debug log to formatDateTime start 2026-10-07 13:33:39 +02:00
Richard Zink bf109e8225 Add debug log to MMMM token 2026-10-07 13:31:53 +02:00
Richard Zink baafbcf760 Force debug update on language change to refresh digital clock 2026-10-07 13:29:43 +02:00
Richard Zink bbff9b9874 Implement exact moon position based on phase (synodic month ~29.53d) 2026-10-07 13:27:04 +02:00
Richard Zink 933ad5e19b Add RPG clock angles (sun/moon rise/set/now) to debug panel 2026-10-07 13:22:24 +02:00
Richard Zink 86b2714b21 Add full weekday/month names; evaluate \n and \t escapes in format 2026-10-07 13:19:59 +02:00
Richard Zink 90730af49d Use the test time format with fixed minute (mm) in config.js 2026-10-07 13:17:29 +02:00
Richard Zink d1257bdd2c Add non-standard extension tokens DDD and MMM (localized) 2026-10-07 13:16:29 +02:00
Richard Zink 0bcb9878b1 Strict ISO 8601 tokens: MM=month (always), mm=minute 2026-10-07 13:14:45 +02:00
Richard Zink 2c0e84d267 Expand English documentation in config.js 2026-10-07 13:08:53 +02:00
Richard Zink dc41cabe4d Add 12-hour format (hh) and AM/PM (a) tokens to time formatter 2026-10-07 13:07:34 +02:00
Richard Zink c2996e4762 Make digital clock format configurable via CONFIG.timeFormat 2026-10-07 13:06:03 +02:00
Richard Zink 66ca03ade4 Restructure i18n.js: English is base, keys are English text 2026-10-07 13:02:29 +02:00
Richard Zink ecc3156652 Set English as base language with DE fallback 2026-10-07 13:00:06 +02:00
Richard Zink 0d5b45d663 Adjust English time-of-day labels (No, Ev) 2026-10-07 12:58:01 +02:00