This document describes how to maintain and update the Wallpaper Engine version of earth-clock.
The wallpaper-engine/ directory is a minimal wrapper around the core web version. It contains:
-
Wallpaper-specific files (not shared):
index.html- Minimal wrapper HTMLwallpaper-config.js- Property listener bridgedata-source-wrapper.js- Data source selectionproject.json- Wallpaper Engine configurationpreview.jpg- Preview image
-
Copied files (synced from
public/):libs/earth/1.0.0/*.js- Core earth library fileslibs/*- JavaScript libraries (D3, Backbone, etc.)data/*- TopoJSON and weather datastyles/*- CSS and fonts
Wallpaper Engine's Chromium-based renderer does not allow access to parent directories (../) for security reasons. Therefore, we must maintain local copies of shared files.
After making changes to core files in public/libs/earth/, run the sync script:
node sync-wallpaper.jsThis copies updated files from public/ to wallpaper-engine/, keeping the versions in sync.
Files synced:
libs/earth/1.0.0/earth.jslibs/earth/1.0.0/globes.jslibs/earth/1.0.0/micro.jslibs/earth/1.0.0/products.js
Files NOT synced (wallpaper-specific):
wallpaper-config.jsdata-source-wrapper.jsproject.jsonindex.html(wrapper only)
- Make changes to core code in
public/libs/earth/ - Run sync script:
node sync-wallpaper.js - Test in Wallpaper Engine editor:
- Open Wallpaper Engine
- Open your wallpaper project
- Test all properties and features
- Check console for errors (enable CEF devtools)
- Update on Steam Workshop:
- In Wallpaper Engine editor, click Workshop → Update Wallpaper on Workshop
- Add update notes describing changes
- Click Update
- Core changes made and tested in web version
- Sync script run successfully
- Tested in Wallpaper Engine editor
- All properties working correctly
- No console errors
- Preview image updated (if needed)
- Update notes written
- Published to Steam Workshop
No automatic API available. Wallpaper Engine uses Steam Workshop for distribution, which requires manual uploads through the Wallpaper Engine editor. There is no programmatic API for publishing updates.
User Experience: Once you publish an update, users who have subscribed to your wallpaper will automatically receive the update through Steam Workshop.
- projection (combo) - Map projection type (8 options)
- overlay (combo) - Weather overlay type (includes
Random (each start)option) - height (combo) - Atmospheric pressure level (8 options)
- longitude (slider) - Horizontal rotation (-180 to 180)
- latitude (slider) - Vertical rotation (-90 to 90)
- zoom (slider) - Zoom/scale level (100 to 2000)
- daynight (bool) - Day/night terminator overlay
- datasource (combo) - Data source (Live/Bundled)
- showclock (bool) - Show/hide time display
- spinSpeed (slider) - Auto-rotation speed (0 to 360 degrees/minute, 0 = off)
If the user selects Overlay → Random (each start), the wallpaper will pick one overlay at startup from:
- Wind Speed
- Temperature
- Relative Humidity
- Air Density
- Wind Power Density
- Total Precipitable Water
- Total Cloud Water
- Mean Sea Level Pressure
The choice is made once per wallpaper load and stays stable until the wallpaper is restarted (or the user picks a non-random overlay).
- Add property definition to
wallpaper-engine/project.json - Add handler in
wallpaper-engine/wallpaper-config.jsapplyProperties()function - Expose any needed functions from
earth.jstowindowobject - Test in Wallpaper Engine editor
- Update documentation
Test the wallpaper HTML directly:
# Open wallpaper-engine/index.html in browser
# It will fall back to hash parameters if not in Wallpaper Engine- Open Wallpaper Engine
- Click Edit → Open in Explorer to access project files
- Enable CEF devtools for debugging:
- Settings → General → CEF devtools port:
8080 - Open
http://localhost:8080in Chrome for debugging
- Settings → General → CEF devtools port:
- Test all properties
- Check console for errors
- Check that
wallpaper-config.jsloads beforeearth.jsinindex.html - Verify
window.wallpaperPropertyListeneris initialized immediately (not after delays) - Check console for initialization errors
- Ensure properties are queued if earth.js isn't ready yet
- Verify property listener is set up before earth.js initializes
- Check that properties are applied after earth.js is ready
- Look for timing issues in console logs
- Verify
window.setAutoRotateSpeedis available - Check that rotation pauses during user interaction
- Test with different projection types
wallpaper-engine/
├── index.html # Minimal wrapper
├── wallpaper-config.js # Property bridge
├── data-source-wrapper.js # Data source handler
├── project.json # Wallpaper Engine config
├── preview.jpg # Preview image
├── libs/ # Copied from public/libs/
│ └── earth/1.0.0/ # Core library (synced)
├── data/ # Copied from public/data/
└── styles/ # Copied from public/styles/
- Keep core logic in
public/libs/earth/- Single source of truth - Run sync script after changes - Keep versions in sync
- Test thoroughly - Wallpaper Engine environment differs from browser
- Document changes - Update this file when adding features
- Version control - Commit both
public/andwallpaper-engine/changes
- Consider build script to automate sync and validation
- Add automated tests for property handling
- Create deployment checklist script
A classic Windows screensaver has been implemented in screensaver/EarthClock.Screensaver/. It uses WinForms + WebView2 to host the existing HTML wallpaper.
- Self-contained build: Single ~162 MB .scr file with no .NET runtime dependency
- Live data with fallback: Fetches current weather from live server, falls back to bundled data
- Built-in CORS proxy: Handles cross-origin requests for live weather data
- All screensaver modes:
/s- Fullscreen on primary monitor/p <HWND>- Preview (shows static image in Control Panel preview)/c- Settings dialog
- Exit behavior: Closes on any key press, mouse move beyond threshold, or mouse click
- Anti-throttling: Browser flags to prevent animation slowdown
See DEPLOYMENT.md for detailed build and installation instructions.
Settings are stored in %LOCALAPPDATA%\EarthClock.Screensaver\settings.json:
- Data Source: Live server or bundled data
- Projection: orthographic, equirectangular, etc.
- Overlay: wind, temperature, humidity, etc.
- Day/Night: Toggle terminator overlay
- Show Clock: Toggle time display
- Spin Speed: Auto-rotation in degrees per minute