- atmosphere: physical terrain lighting (air mass, Rayleigh beam colour, skylight, moon, starlight floor), aerial perspective for terrain and cloud deck, configurable haze/albedo/ambient gains - clouds: march the deck in height instead of ray distance, IGN dither (no per-frame flicker), per-step height jitter, 4-octave fbm renormalised, softer density threshold, distance softening as a procedural mip, grazing path clamp, cloud shadows on the ground (cloudShadowDensity/ Floor/Ambient) and cloud haze factor - terrain: self-shadows from the elevation field (penumbra + shadow floor), soft mosaic rim (edgeFadeTiles), east/west axis corrected (+X = west) - lights: per-object twilight switching for cars, city dots and ground blocks - flights: contrail width 620 m, fade to zero by contrailFadeKm, aircraft size decoupled from trail width, count halved - render: CONFIG.renderScale with integer upscale + image-rendering: pixelated - data: nginx overpass proxy + cache, per-mirror cooldown ladder, ring-based cell ordering (disc fills evenly), settlements fetched before roads, interim chain persistence, two worker lanes (car/city) with progress logs - removed: NASA VIIRS night-lights layer (fetch, canvas, texture, uniforms)
155 lines
7.6 KiB
Plaintext
155 lines
7.6 KiB
Plaintext
server {
|
|
listen 58881 default_server;
|
|
server_name localhost _;
|
|
root /usr/share/nginx/html;
|
|
index background.html;
|
|
|
|
location / {
|
|
add_header Cache-Control "no-store, must-revalidate" always;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# Page, config and scripts must never come out of a stale browser
|
|
# cache: without this a changed CONFIG (new location, layer toggles)
|
|
# keeps rendering the previous setup until a hard reload.
|
|
location ~* \.(js|html)$ {
|
|
add_header Cache-Control "no-store, must-revalidate" always;
|
|
}
|
|
|
|
# The background page runs as an iframe on other origins; a stray
|
|
# favicon request must not log 404s.
|
|
location = /favicon.ico {
|
|
return 204;
|
|
access_log off;
|
|
}
|
|
|
|
# CORS proxy for Carto basemaps (place names, OSM-derived).
|
|
# URL format: /carto/voyager/{z}/{x}/{y}.png
|
|
location ^~ /carto/ {
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
proxy_pass https://a.basemaps.cartocdn.com/;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host a.basemaps.cartocdn.com;
|
|
proxy_set_header User-Agent "Mozilla/5.0 (compatible; tile-proxy)";
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
|
add_header Access-Control-Max-Age 86400 always;
|
|
}
|
|
|
|
# CORS proxy for ESRI World_Street_Map. URL format:
|
|
# /esri/wsm/{z}/{y}/{x}.jpg -> ESRI /ArcGIS/.../World_Street_Map/.../tile/{z}/{y}/{x}
|
|
location ^~ /esri/ {
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
rewrite ^/esri/streets/(.*)$ /ArcGIS/rest/services/World_Street_Map/MapServer/tile/$1 break;
|
|
rewrite ^/esri/topo/(.*)$ /ArcGIS/rest/services/World_Topo_Map/MapServer/tile/$1 break;
|
|
rewrite ^/esri/imagery/(.*)$ /ArcGIS/rest/services/World_Imagery/MapServer/tile/$1 break;
|
|
proxy_pass https://server.arcgisonline.com;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host server.arcgisonline.com;
|
|
proxy_set_header User-Agent "Mozilla/5.0 (compatible; tile-proxy)";
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
|
add_header Access-Control-Max-Age 86400 always;
|
|
}
|
|
|
|
# CORS proxy for Mapzen/TILEZEN terrain-RGB "terrarium" elevation
|
|
# tiles (Copernicus DEM). URL format: /terrarium/{z}/{x}/{y}.png
|
|
location ^~ /terrarium/ {
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
proxy_pass https://s3.amazonaws.com/elevation-tiles-prod/terrarium/;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host s3.amazonaws.com;
|
|
proxy_set_header User-Agent "Mozilla/5.0 (compatible; tile-proxy)";
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
}
|
|
|
|
# CORS proxy for Overpass (road, place and airport queries). The public
|
|
# mirrors answer cross-origin POSTs without Access-Control-Allow-Origin
|
|
# (or refuse outright), so the app talks to same-origin paths here and
|
|
# nginx forwards with a browser-like request. Overpass timeouts are long:
|
|
# a busy instance needs more than the default 60 s.
|
|
# URL format: /overpass/<mirror>/interpreter (mirror: api | coffee | mail)
|
|
location ^~ /overpass/api/ {
|
|
# Host in a variable so the resolver directive applies: with a literal
|
|
# host nginx resolves at config time and tried AAAA records, which the
|
|
# container cannot reach (101 Network unreachable) and which then
|
|
# disabled the upstream for a while.
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
set $overpass_api_host "overpass-api.de";
|
|
proxy_pass https://$overpass_api_host/api/;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host overpass-api.de;
|
|
proxy_set_header Origin "https://overpass-api.de";
|
|
proxy_set_header Referer "https://overpass-api.de/api/interpreter";
|
|
proxy_set_header User-Agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
|
|
proxy_connect_timeout 15s; proxy_send_timeout 120s; proxy_read_timeout 120s;
|
|
# A cell that answered once is kept for 30 days and served even while
|
|
# the mirror is down (stale), so a flaky instance cannot undo progress
|
|
# the browser already paid for.
|
|
proxy_cache overpass;
|
|
proxy_cache_key "$scheme$host$request_uri$request_body";
|
|
proxy_cache_methods POST;
|
|
proxy_cache_valid 200 30d;
|
|
proxy_cache_lock on;
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
|
add_header X-Cache $upstream_cache_status always;
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
}
|
|
location ^~ /overpass/coffee/ {
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
set $overpass_coffee_host "overpass.private.coffee";
|
|
proxy_pass https://$overpass_coffee_host/api/;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host overpass.private.coffee;
|
|
proxy_set_header Origin "https://overpass.private.coffee";
|
|
proxy_set_header Referer "https://overpass.private.coffee/api/interpreter";
|
|
proxy_set_header User-Agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
|
|
proxy_connect_timeout 15s; proxy_send_timeout 120s; proxy_read_timeout 120s;
|
|
# A cell that answered once is kept for 30 days and served even while
|
|
# the mirror is down (stale), so a flaky instance cannot undo progress
|
|
# the browser already paid for.
|
|
proxy_cache overpass;
|
|
proxy_cache_key "$scheme$host$request_uri$request_body";
|
|
proxy_cache_methods POST;
|
|
proxy_cache_valid 200 30d;
|
|
proxy_cache_lock on;
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
|
add_header X-Cache $upstream_cache_status always;
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
}
|
|
location ^~ /overpass/mail/ {
|
|
resolver 1.1.1.1 8.8.8.8 ipv6=off valid=300s;
|
|
set $overpass_mail_host "maps.mail.ru";
|
|
proxy_pass https://$overpass_mail_host/osm/tools/overpass/api/;
|
|
proxy_ssl_server_name on;
|
|
proxy_set_header Host maps.mail.ru;
|
|
proxy_set_header Origin "https://maps.mail.ru";
|
|
proxy_set_header Referer "https://maps.mail.ru/osm/tools/overpass/api/interpreter";
|
|
proxy_set_header User-Agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
|
|
proxy_connect_timeout 15s; proxy_send_timeout 120s; proxy_read_timeout 120s;
|
|
# A cell that answered once is kept for 30 days and served even while
|
|
# the mirror is down (stale), so a flaky instance cannot undo progress
|
|
# the browser already paid for.
|
|
proxy_cache overpass;
|
|
proxy_cache_key "$scheme$host$request_uri$request_body";
|
|
proxy_cache_methods POST;
|
|
proxy_cache_valid 200 30d;
|
|
proxy_cache_lock on;
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
|
add_header X-Cache $upstream_cache_status always;
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
}
|
|
|
|
# CORS preflight handler
|
|
location ~* \.(png|jpg)$ {
|
|
if ($request_method = 'OPTIONS') {
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
|
add_header Access-Control-Max-Age 86400 always;
|
|
add_header Content-Length 0;
|
|
return 204;
|
|
}
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
}
|
|
}
|