Separate flight and fetch directions via URL params

Two independent URL parameters:
  #flight=N|NE|E|SE|S|SW|W|NW  (camera motion direction)
  #fetch=N|NE|E|SE|S|SW|W|NW   (tile collection direction)

Example: #flight=E&fetch=N -> camera flies east, corridor built
north (perpendicular to flight). Lets you test what happens when
the corridor orientation doesn't match the camera's flight path.

URL parsing supports & and ; as separators, plus multiple keys
in one hash. window.__flightDir and window.__fetchDir are exposed
separately so JS code can react to each.
This commit is contained in:
Richard Zink committed 2026-10-07 21:51:24 +02:00
1 parent 9027099d89
commit f21a967643
2 files changed
+36 -15

No files matched your search

+5 -5
View File
@@ -285,11 +285,11 @@ function init(canvas) {
var GROUND_TILE_URL = 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/';
var GROUND_TILE_Z = 11;
var GROUND_TILE_SIZE = 256;
// Camera flight direction. Set from window.__flightDir (URL: #flight=N|NE|E|...).
// Default is N (= +Z forward). Each flight direction rotates the
// corridor so its long axis follows the camera path.
var GROUND_TRAVEL_COS = (window.__flightDir && window.__flightDir.cos) || 0.0;
var GROUND_TRAVEL_SIN = (window.__flightDir && window.__flightDir.sin) || 1.0;
// Fetch direction: which way the tile corridor is oriented.
// Independent of flight direction (set via #fetch=N|NE|E|...).
// Default N (= +Z, canvas Y = +Z).
var GROUND_TRAVEL_COS = (window.__fetchDir && window.__fetchDir.cos) || 0.0;
var GROUND_TRAVEL_SIN = (window.__fetchDir && window.__fetchDir.sin) || 1.0;
var GROUND_CORRIDOR_LONG = 25; // tiles along travel direction (~3.5 min of flight at uSpeed=1)
var GROUND_CORRIDOR_PERP = 5; // tiles perpendicular to travel
var GROUND_BUFFER_LONG = 11; // refetch when this close to forward edge