config+docs: sun/moon/camera/day blocks, moon map attribution and cache manifest
This commit is contained in:
1 parent
21f75e64ce
commit
e005789ba8
2 files changed
+80
-14
No files matched your search
@@ -14,7 +14,9 @@ dropped into an iframe or kiosk browser and left running.
|
|||||||
ground: direct beam through a Kasten-Young air mass with Rayleigh, ozone and
|
ground: direct beam through a Kasten-Young air mass with Rayleigh, ozone and
|
||||||
aerosol extinction, diffuse skylight, moonlight, a starlight floor and aerial
|
aerosol extinction, diffuse skylight, moonlight, a starlight floor and aerial
|
||||||
perspective. Sun and moon come from the real positions (SunCalc) for
|
perspective. Sun and moon come from the real positions (SunCalc) for
|
||||||
`CONFIG.location`, or from an accelerated 24 h simulation (`CONFIG.day`).
|
`CONFIG.location`; `CONFIG.day` can move the clock those positions are
|
||||||
|
evaluated at (start at a chosen date/time, optionally accelerated) without
|
||||||
|
replacing the astronomy.
|
||||||
- **Theme-tinted lighting**: each theme may pull the physical colours toward
|
- **Theme-tinted lighting**: each theme may pull the physical colours toward
|
||||||
its own palette and set its own day/night exposure, without replacing the
|
its own palette and set its own day/night exposure, without replacing the
|
||||||
physics (`window.THEMES[...].lighting`).
|
physics (`window.THEMES[...].lighting`).
|
||||||
@@ -126,7 +128,10 @@ Groups:
|
|||||||
| `lights` | twilight switching window of every artificial light (`offDeg`, `onDeg`, `softDeg`) |
|
| `lights` | twilight switching window of every artificial light (`offDeg`, `onDeg`, `softDeg`) |
|
||||||
| `atmosphere` | turbidity, moon/star gains, night floor, albedo/sky/air gains, haze residual, cloud albedo and cloud haze, cloud shadows, terrain shadows |
|
| `atmosphere` | turbidity, moon/star gains, night floor, albedo/sky/air gains, haze residual, cloud albedo and cloud haze, cloud shadows, terrain shadows |
|
||||||
| `stars` | star colour `tint` and `brightness` |
|
| `stars` | star colour `tint` and `brightness` |
|
||||||
| `day` | `simulation`, `cycleSeconds`, `fixedTime` |
|
| `sun` | `angularRadius` (disc size only, 12x physical by default) |
|
||||||
|
| `moon` | disc size (`angularRadius`, 12x physical by default), `texture`, `lightGain`, `earthshine`, `limbDarkening`, `brightness`, `halo`, `flipU`/`flipV` |
|
||||||
|
| `camera` | `aim` (`'off'` or `'moon'`), `aimEase`, `aimBob` |
|
||||||
|
| `day` | `startAt` (`'YYYY-MM-DDTHH:MM'` or null), `speed` (virtual s per real s) |
|
||||||
|
|
||||||
### World scale
|
### World scale
|
||||||
|
|
||||||
@@ -169,13 +174,19 @@ All off by default, all documented in `config.js`:
|
|||||||
ground texture (orientation check).
|
ground texture (orientation check).
|
||||||
- `terrain: { wireframe: true }` - draw the mesh edges.
|
- `terrain: { wireframe: true }` - draw the mesh edges.
|
||||||
- `ground: { style: 'streets' }` - labelled street map instead of satellite.
|
- `ground: { style: 'streets' }` - labelled street map instead of satellite.
|
||||||
- `day: { simulation: true }` / `weatherSim: true` - deterministic day cycle and
|
- `day: { startAt: '2026-10-29T20:56', speed: 1440 }` - start the scene at a
|
||||||
weather cycle for comparing looks.
|
chosen moment and run the clock accelerated (1440 = one day per minute);
|
||||||
|
`speed: 1` runs it at real time from that moment, `startAt: null` is strictly
|
||||||
|
real time. Sun, moon, phase, clock hands and weather all follow that clock.
|
||||||
|
- `weatherSim: true` - deterministic weather cycle for comparing looks.
|
||||||
|
|
||||||
## URL hash parameters
|
## URL hash parameters
|
||||||
|
|
||||||
`http://host:58881/#flight=N&fetch=S`
|
`http://host:58881/#flight=N&fetch=S`
|
||||||
|
|
||||||
|
- `at=2026-10-29T20:56` - start the clock at this local date/time (overrides
|
||||||
|
`CONFIG.day.startAt`).
|
||||||
|
- `speed=1440` - virtual seconds per real second (overrides `CONFIG.day.speed`).
|
||||||
- `flight=N|NE|E|SE|S|SW|W|NW` - heading of the straight flight corridor (used
|
- `flight=N|NE|E|SE|S|SW|W|NW` - heading of the straight flight corridor (used
|
||||||
when `CONFIG.orbit` is disabled)
|
when `CONFIG.orbit` is disabled)
|
||||||
- `fetch=N|NE|E|SE|S|SW|W|NW` - direction the tile mosaic is prefetched ahead of
|
- `fetch=N|NE|E|SE|S|SW|W|NW` - direction the tile mosaic is prefetched ahead of
|
||||||
@@ -248,6 +259,7 @@ window.TRANSLATIONS['Sunrise']['xx'] = 'MyTranslation';
|
|||||||
├── vendor/
|
├── vendor/
|
||||||
│ ├── clouds3d.js WebGL scene renderer (sky, clouds, terrain, lights)
|
│ ├── clouds3d.js WebGL scene renderer (sky, clouds, terrain, lights)
|
||||||
│ ├── suncalc.js sun/moon positions - ISC (SunCalc by mourner)
|
│ ├── suncalc.js sun/moon positions - ISC (SunCalc by mourner)
|
||||||
|
│ ├── moon.jpg lunar surface map for the moon disc - CC BY 4.0
|
||||||
│ ├── plane3d.js low-poly aircraft model - CC0
|
│ ├── plane3d.js low-poly aircraft model - CC0
|
||||||
│ ├── stars.json Yale Bright Star Catalogue subset
|
│ ├── stars.json Yale Bright Star Catalogue subset
|
||||||
│ └── LICENSE per-library license attributions
|
│ └── LICENSE per-library license attributions
|
||||||
@@ -274,5 +286,7 @@ window.TRANSLATIONS['Sunrise']['xx'] = 'MyTranslation';
|
|||||||
- **Copernicus DEM** (terrain, via Mapzen/TILEZEN terrarium tiles): open data -
|
- **Copernicus DEM** (terrain, via Mapzen/TILEZEN terrarium tiles): open data -
|
||||||
<https://registry.opendata.aws/terrain-tiles/>
|
<https://registry.opendata.aws/terrain-tiles/>
|
||||||
- **Yale Bright Star Catalogue** (star positions, via `vendor/stars.json`)
|
- **Yale Bright Star Catalogue** (star positions, via `vendor/stars.json`)
|
||||||
|
- **Solar System Scope** (lunar surface map, via `vendor/moon.jpg`): CC BY 4.0 -
|
||||||
|
<https://www.solarsystemscope.com/textures/>
|
||||||
- **OpenStreetMap Nominatim** (reverse geocoding): ODbL -
|
- **OpenStreetMap Nominatim** (reverse geocoding): ODbL -
|
||||||
<https://nominatim.org/release/>
|
<https://nominatim.org/release/>
|
||||||
@@ -155,6 +155,32 @@ window.CONFIG = {
|
|||||||
// density: { sunny: 0.05, cloudy: 0.9, stormy: 1.0, night: 0.2 }
|
// density: { sunny: 0.05, cloudy: 0.9, stormy: 1.0, night: 0.2 }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Moon
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// The disc is drawn artistically larger than the real one (0.0046 rad
|
||||||
|
// = 0.26 deg, about 9 px at 1080p) so that the surface texture and the
|
||||||
|
// phase are actually readable. The terminator itself stays geometric:
|
||||||
|
// lit side = surface normal dot sun direction.
|
||||||
|
// The map is sampled in a selenographic frame built from the north
|
||||||
|
// celestial pole, so the disc shows north up and east to the right -
|
||||||
|
// like a printed lunar map - and rotates as the moon crosses the sky.
|
||||||
|
moon: {
|
||||||
|
angularRadius: 0.0552, // 12x the physical 0.0046 rad
|
||||||
|
texture: 'vendor/moon.jpg', // equirectangular near-side map
|
||||||
|
// Scene moonlight (terrain, aircraft, contrails, airlight) is
|
||||||
|
// scaled with the disc, but only half of the excess over the
|
||||||
|
// physical size counts: 1 + 0.5 * (angularRadius/0.0046 - 1) = 6.5.
|
||||||
|
// Set 1.0 for the strictly physical night brightness.
|
||||||
|
lightGain: 6.5,
|
||||||
|
earthshine: 0.10, // faint light on the dark side
|
||||||
|
limbDarkening: 0.30, // surface dims towards the limb
|
||||||
|
brightness: 2.20, // per-pixel luminance of the disc
|
||||||
|
halo: 1.0, // glow around the disc, scales with phase
|
||||||
|
flipU: false, // mirror the map if orientation is wrong
|
||||||
|
flipV: false
|
||||||
|
},
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Civil aviation
|
// Civil aviation
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
@@ -308,18 +334,44 @@ window.CONFIG = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Day cycle
|
// Sun
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// simulation: true runs a full 24 h cycle in cycleSeconds (sun rises
|
// The real sun is 0.00465 rad (0.27 deg). Like the moon, the disc is
|
||||||
// east, culminates south, sets west) and the clock plus the sun/moon
|
// drawn larger so it reads as a disc; the surface brightness and the
|
||||||
// tables follow the simulated date. false uses the real SunCalc positions.
|
// scene lighting are NOT scaled with it.
|
||||||
|
sun: {
|
||||||
|
angularRadius: 0.0558 // 12x the physical 0.00465 rad
|
||||||
|
},
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Camera
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// The camera always flies the configured path (figure eight or straight
|
||||||
|
// drift); 'aim' changes only where it LOOKS. 'moon' turns the view to
|
||||||
|
// the moon - heading to its azimuth, pitch to its altitude - while the
|
||||||
|
// flight path, the fetch corridor and the traffic stay as they are.
|
||||||
|
// Below the horizon the view holds the moon's azimuth at the horizon.
|
||||||
|
camera: {
|
||||||
|
aim: 'off', // 'off' | 'moon'
|
||||||
|
aimEase: 0.94, // 0 = instant turn, 0.99 = very slow
|
||||||
|
aimBob: 0.25 // share of the altitude bob kept while aiming
|
||||||
|
// camera: { aim: 'moon' } // look at the moon
|
||||||
|
},
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Clock
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// Sun and moon are always the real ones (SunCalc ephemeris) - this block
|
||||||
|
// only moves the clock that the astronomy is evaluated at. startAt picks
|
||||||
|
// the moment the scene begins at, speed advances it from there: 1 = real
|
||||||
|
// time, 1440 = one simulated day per minute. Clock hands, digital readout,
|
||||||
|
// weather and sky all use the same clock. Hash overrides: #at=... #speed=...
|
||||||
day: {
|
day: {
|
||||||
simulation: false, // false = the real sun and moon (default)
|
startAt: null, // null = strictly real time
|
||||||
cycleSeconds: 60, // only used when simulation is true:
|
speed: 1 // virtual seconds per real second
|
||||||
// 60 s = one simulated day per minute
|
// day: { startAt: '2026-10-29T20:56', speed: 1 } // start at a chosen
|
||||||
fixedTime: null // 'HH:MM' or 0-24 freezes the sim clock
|
// // moment, real pace
|
||||||
// (clouds, traffic and flights keep moving)
|
// day: { startAt: '2026-10-29T20:56', speed: 1440 } // accelerated
|
||||||
// day: { simulation: true, cycleSeconds: 60 } // accelerated day
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|||||||
Reference in new issue
Block a user