From 555aa0c345fb067a13dde6a8a676a90654cf15c4 Mon Sep 17 00:00:00 2001 From: pacMakaveli Date: Fri, 12 Jun 2026 13:52:40 +0100 Subject: [PATCH] feat: rebrand widget from games.directory to Orbit Rename the widget's own branding to Orbit across page titles, logo text, aria-labels and source-file headers. Rename the embed contract to match: window.__GD_SCENE__ -> window.__ORBIT_SCENE__ and localStorage keys gd-globe-scene[-open] -> orbit-scene[-open] (breaking for existing embeds and saved panel state). The 'games.directory platform' origin references in the README/docs are intentionally kept. Also remove the disclaimer/usage footer from the root chooser page and fold the local-server note into docs/USAGE.md. --- CHANGELOG.md | 2 ++ canvas/cinema.js | 2 +- canvas/draw.js | 2 +- canvas/engine.js | 2 +- canvas/index.html | 9 +++------ canvas/layers.js | 2 +- canvas/main.js | 6 +++--- docs/USAGE.md | 16 ++++++++++++++-- index.html | 32 ++++---------------------------- legacy/data.js | 6 +++--- legacy/globe.js | 10 +++++----- legacy/index.html | 6 +++--- shared/config.js | 6 +++--- shared/data.js | 4 ++-- shared/engine.js | 2 +- shared/fps.js | 2 +- shared/geo.js | 2 +- shared/geometry.js | 2 +- shared/scene-schema.js | 2 +- shared/sim.js | 2 +- shared/ui.css | 2 +- shared/ui.js | 2 +- shared/util.js | 2 +- svg/engine.js | 2 +- svg/index.html | 6 +++--- svg/layers.js | 2 +- svg/main.js | 6 +++--- svg/scene.css | 2 +- 28 files changed, 64 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de05f4..10e9ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Adaptive quality in `BaseEngine`: an EMA of frame time nudges a dpr multiplier (down to 0.55) with cooldown hysteresis so weak GPUs get a softer image instead of dropped frames. - Richer visuals: deeper offset-lit ocean, wider atmospheric rim with a crisp shell line, 4-layer beams, twin impact rings, 3-pass aurora, warmer city lights. - Calmer defaults and pacing: rotation 4°/s, activity 2.4/s, meteor frequency 40%, slower/longer-lived meteors and beams. +- Renamed the widget's own branding from "games.directory" to **Orbit** across UI titles, logos and file headers. The embed API global is now `window.__ORBIT_SCENE__` (was `__GD_SCENE__`) and the persisted panel keys are `orbit-scene` / `orbit-scene-open` (was `gd-globe-*`) — a breaking change for existing embeds and saved settings. +- Moved the local-server / usage note off the root chooser page into [`docs/USAGE.md`](docs/USAGE.md). ### Fixed diff --git a/canvas/cinema.js b/canvas/cinema.js index a555933..227fbdc 100644 --- a/canvas/cinema.js +++ b/canvas/cinema.js @@ -1,4 +1,4 @@ -/* games.directory globe — Canvas2D cinematic layers +/* Orbit — Canvas2D cinematic layers * * The wow extras: the Moon, the rare comet, constellations, the ocean sun * glint, the HQ heartbeat and the city-surge marker. Same layer contract as diff --git a/canvas/draw.js b/canvas/draw.js index 34e1e68..5761774 100644 --- a/canvas/draw.js +++ b/canvas/draw.js @@ -1,4 +1,4 @@ -/* games.directory globe — shared Canvas2D draw helpers +/* Orbit — shared Canvas2D draw helpers * * Tiny rendering utilities used by both canvas/layers.js (the core layers) * and canvas/cinema.js (the cinematic extras). Rendering only — no geometry, diff --git a/canvas/engine.js b/canvas/engine.js index 0034751..29f3adf 100644 --- a/canvas/engine.js +++ b/canvas/engine.js @@ -1,4 +1,4 @@ -/* games.directory globe — Canvas2D engine +/* Orbit — Canvas2D engine * * Thin subclass of BaseEngine (shared/engine.js): all the shared machinery lives * there; here we only wire the canvas-specific hooks. Each frame clears the diff --git a/canvas/index.html b/canvas/index.html index a1ed53e..9866138 100644 --- a/canvas/index.html +++ b/canvas/index.html @@ -3,7 +3,7 @@ - games.directory · Activity Globe (Canvas) + Orbit · Activity Globe (Canvas)
- +
g
-
games.directory
+
Orbit
Live activity · worldwide
diff --git a/canvas/layers.js b/canvas/layers.js index 364cbc7..e672952 100644 --- a/canvas/layers.js +++ b/canvas/layers.js @@ -1,4 +1,4 @@ -/* games.directory globe — Canvas2D render layers +/* Orbit — Canvas2D render layers * * Each layer is { name, z, rebuildOn?, build?, resize?, simulate?, visible?, draw }. * Layers draw in ascending z. To add an effect, write a factory and add it to diff --git a/canvas/main.js b/canvas/main.js index 6df6f3b..ebde562 100644 --- a/canvas/main.js +++ b/canvas/main.js @@ -1,11 +1,11 @@ -/* games.directory globe — Canvas2D entry point +/* Orbit — Canvas2D entry point * * Modes: * • clean (default) — the production hero: globe + brand + live ticker, no controls. * • demo (?demo) — adds the FPS meter and the full control / "Scene & effects" panel. * * Scene source (all validated against the schema before use): - * • window.__GD_SCENE__ inline embed from the platform (highest priority) + * • window.__ORBIT_SCENE__ inline embed from the platform (highest priority) * • ?config= fetch the per-deployment config JSON * • ?demo the demo's own localStorage * • otherwise schema defaults @@ -33,7 +33,7 @@ const data = { HQ, ACTIVITY_TYPES, CITIES, landFeature: null }; const scene = await resolveScene({ demo, configUrl: params.get('config'), - inline: window.__GD_SCENE__, + inline: window.__ORBIT_SCENE__, }); const engine = new Engine({ canvas, scene, sim, data }); registerDefaultLayers(engine); diff --git a/docs/USAGE.md b/docs/USAGE.md index 6c6ec49..88cda01 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -8,6 +8,18 @@ Orbit runs in two modes, served from a static file server (see - **Demo** — add `?demo` (`/canvas/?demo`): adds the FPS meter and the full control + **Scene & effects** panel for tuning. The chooser links here. +The bare `/canvas/` or `/svg/` URL is the clean hero (globe only, no controls); +the `?demo` links add live controls + FPS. + +## Running locally + +The world map is fetched at runtime, so Orbit needs to be served over HTTP (not +opened as a `file://` path). Any static server works, e.g.: + +``` +python3 -m http.server 8000 # → http://localhost:8000 +``` + ## Controls Everything is user-tunable live via the **Scene & effects** panel (in demo mode), @@ -25,7 +37,7 @@ cities, and activity types (label / colour / weight). Then embed the clean hero: ```html ``` @@ -52,7 +64,7 @@ contract with the games.directory platform: At runtime the scene is resolved by `resolveScene()` in this precedence: -1. **`window.__GD_SCENE__`** — an inline config object the platform embeds; +1. **`window.__ORBIT_SCENE__`** — an inline config object the platform embeds; 2. **`?config=`** — fetched per-deployment config JSON (from your API); 3. **`?demo`** — the demo panel's own `localStorage`; 4. otherwise — schema defaults. diff --git a/index.html b/index.html index 7e00b04..6e2d4d3 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - games.directory · Activity Globe — Canvas vs SVG + Orbit · Activity Globe — Canvas vs SVG
-
g
-
games.directory · Activity Globe
+
o
+
Orbit · Activity Globe

One globe, two render engines.

@@ -340,23 +327,12 @@

SVG

Read the write-up - -

- Needs a static server (the world map is fetched at runtime): - python3 -m http.server 8000http://localhost:8000
- The links above open demo mode (?demo) with live controls + FPS. The - bare canvas/ or svg/ URL is the clean hero — globe only, no - controls.
- Customise HQ / cities / activity types in shared/data.js; scene settings come - from the platform (?config=<url> or window.__GD_SCENE__), - bounded by shared/scene-schema.js. -

- games.directory · side-by-side + Orbit · side-by-side ← Back to chooser
diff --git a/legacy/data.js b/legacy/data.js index 3d6b3be..13c9b92 100644 --- a/legacy/data.js +++ b/legacy/data.js @@ -1,12 +1,12 @@ -/* games.directory globe — data layer +/* Orbit — data layer * HQ, activity types, and real-world city coordinates ([lng, lat]). * Coordinates are accurate; the projection places them precisely on the sphere. */ window.GD = window.GD || {}; -// games.directory HQ — London, UK -GD.HQ = { name: 'games.directory HQ', city: 'London', lnglat: [-0.1276, 51.5074] }; +// Orbit HQ — London, UK +GD.HQ = { name: 'Orbit HQ', city: 'London', lnglat: [-0.1276, 51.5074] }; // Activity types. `color` is the live, user-editable beam colour. GD.ACTIVITY_TYPES = [ diff --git a/legacy/globe.js b/legacy/globe.js index 4416388..b4f9883 100644 --- a/legacy/globe.js +++ b/legacy/globe.js @@ -1,4 +1,4 @@ -/* games.directory globe — engine +/* Orbit — engine * Accurate rotating orthographic globe (D3 geo) with dotted land, * and great-circle "activity beams" that fire from real city * coordinates and converge on HQ. Rendered in SVG. @@ -60,14 +60,14 @@ }; var scene = Object.assign({}, SCENE_DEFAULTS); try { - var saved = JSON.parse(localStorage.getItem('gd-globe-scene') || '{}'); + var saved = JSON.parse(localStorage.getItem('orbit-scene') || '{}'); Object.keys(saved).forEach(function (k) { if (k in scene) scene[k] = saved[k]; }); } catch (e) {} function saveScene() { try { - localStorage.setItem('gd-globe-scene', JSON.stringify(scene)); + localStorage.setItem('orbit-scene', JSON.stringify(scene)); } catch (e) {} } var DENSITY_STEP = { sparse: 3.8, med: 3.0, dense: 2.4 }; @@ -1410,7 +1410,7 @@ else host.setAttribute('hidden', ''); gear.setAttribute('aria-pressed', open ? 'true' : 'false'); try { - localStorage.setItem('gd-globe-scene-open', open ? '1' : '0'); + localStorage.setItem('orbit-scene-open', open ? '1' : '0'); } catch (e) {} } gear.addEventListener('click', function () { @@ -1418,7 +1418,7 @@ }); var wasOpen = false; try { - wasOpen = localStorage.getItem('gd-globe-scene-open') === '1'; + wasOpen = localStorage.getItem('orbit-scene-open') === '1'; } catch (e) {} if (wasOpen) setOpen(true); } diff --git a/legacy/index.html b/legacy/index.html index 1f7a3b1..41b15b3 100644 --- a/legacy/index.html +++ b/legacy/index.html @@ -3,7 +3,7 @@ - games.directory · Live Activity Globe + Orbit · Live Activity Globe
- + @@ -1033,7 +1033,7 @@
g
-
games.directory
+
Orbit
Live activity · worldwide
diff --git a/shared/config.js b/shared/config.js index 525459f..ffcd38d 100644 --- a/shared/config.js +++ b/shared/config.js @@ -1,4 +1,4 @@ -/* games.directory globe — configuration +/* Orbit — configuration * * The tunable *scene* settings and their bounds live in scene-schema.js (the * platform-facing contract). This module derives the runtime defaults from it, @@ -33,8 +33,8 @@ export const AURORA_SCHEMES = { }; export const STORAGE = { - scene: 'gd-globe-scene', - sceneOpen: 'gd-globe-scene-open', + scene: 'orbit-scene', + sceneOpen: 'orbit-scene-open', }; // ---- demo-mode persistence (localStorage) ------------------------------ diff --git a/shared/data.js b/shared/data.js index e62c592..7d7d3b9 100644 --- a/shared/data.js +++ b/shared/data.js @@ -1,4 +1,4 @@ -/* games.directory globe — content layer (shared by both renderers) +/* Orbit — content layer (shared by both renderers) * * This is the file to edit to make the globe your own: point HQ at your * location, list the cities activity should originate from, and define the @@ -10,7 +10,7 @@ // Where every beam converges. export const HQ = { - name: 'games.directory HQ', + name: 'Orbit HQ', city: 'London', lnglat: [-0.1276, 51.5074], }; diff --git a/shared/engine.js b/shared/engine.js index 099df5f..6cec5f9 100644 --- a/shared/engine.js +++ b/shared/engine.js @@ -1,4 +1,4 @@ -/* games.directory globe — BaseEngine (shared by both renderers) +/* Orbit — BaseEngine (shared by both renderers) * * All the backend-agnostic machinery lives here: the event bus, the ordered * layer registry, the clock, auto-rotation, the beam-spawn cadence, drag-to-spin diff --git a/shared/fps.js b/shared/fps.js index 95322f4..3031d10 100644 --- a/shared/fps.js +++ b/shared/fps.js @@ -1,4 +1,4 @@ -/* games.directory globe — FPS meter overlay (shared) +/* Orbit — FPS meter overlay (shared) * * Smoothed frames-per-second plus frame time, so the canvas and SVG builds can * be compared honestly. Call tick(now) once per rendered frame. diff --git a/shared/geo.js b/shared/geo.js index 732cf0e..1dfc02a 100644 --- a/shared/geo.js +++ b/shared/geo.js @@ -1,4 +1,4 @@ -/* games.directory globe — projection & sun (shared by both renderers) +/* Orbit — projection & sun (shared by both renderers) * * Wraps d3.geoOrthographic but adds a hand-rolled fast forward-projection for * the thousands of land dots / spikes that must project every frame. d3's diff --git a/shared/geometry.js b/shared/geometry.js index c93e2f0..018db80 100644 --- a/shared/geometry.js +++ b/shared/geometry.js @@ -1,4 +1,4 @@ -/* games.directory globe — geometry (shared by both renderers) +/* Orbit — geometry (shared by both renderers) * * Pure functions that turn the projection + scene into coordinates. No DOM, no * canvas, no rendering — each renderer takes these points/arrays and paints them diff --git a/shared/scene-schema.js b/shared/scene-schema.js index 54e6223..f093764 100644 --- a/shared/scene-schema.js +++ b/shared/scene-schema.js @@ -1,4 +1,4 @@ -/* games.directory globe — scene SCHEMA (single source of truth) +/* Orbit — scene SCHEMA (single source of truth) * * SCENE_SCHEMA is plain, JSON-serialisable data: the complete, bounded set of * tunable scene settings, grouped into sections. It is the contract between the diff --git a/shared/sim.js b/shared/sim.js index 1580207..fb761f0 100644 --- a/shared/sim.js +++ b/shared/sim.js @@ -1,4 +1,4 @@ -/* games.directory globe — simulation (shared by both renderers) +/* Orbit — simulation (shared by both renderers) * * Renderer-agnostic decisions and physics, operating on plain numbers. The * renderers own the visual objects (canvas data / svg nodes) but defer *what diff --git a/shared/ui.css b/shared/ui.css index fa0f1ad..2b48208 100644 --- a/shared/ui.css +++ b/shared/ui.css @@ -1,4 +1,4 @@ -/* games.directory globe — shared chrome (backend-agnostic). +/* Orbit — shared chrome (backend-agnostic). * Renderer-specific styling lives in canvas/canvas.css and svg/scene.css. */ :root { --bg: #04050b; diff --git a/shared/ui.js b/shared/ui.js index d16838b..53f77b8 100644 --- a/shared/ui.js +++ b/shared/ui.js @@ -1,4 +1,4 @@ -/* games.directory globe — UI wiring (shared by both renderers) +/* Orbit — UI wiring (shared by both renderers) * * The panel, activity list and ticker are pure DOM and backend-agnostic: they * mutate the live `scene` / `sim` / activity-state objects the engine reads, diff --git a/shared/util.js b/shared/util.js index 9b087ad..ec018f9 100644 --- a/shared/util.js +++ b/shared/util.js @@ -1,4 +1,4 @@ -/* games.directory globe — small pure helpers (shared by both renderers) */ +/* Orbit — small pure helpers (shared by both renderers) */ export const DEG = Math.PI / 180; export const TAU = Math.PI * 2; diff --git a/svg/engine.js b/svg/engine.js index 54bd2a2..7c6b455 100644 --- a/svg/engine.js +++ b/svg/engine.js @@ -1,4 +1,4 @@ -/* games.directory globe — SVG engine +/* Orbit — SVG engine * * Thin subclass of BaseEngine (shared/engine.js). The SVG-specific hooks: nodes * persist between frames (no clear), so renderFrame() just lets every layer mutate diff --git a/svg/index.html b/svg/index.html index ef3bc8f..a21c402 100644 --- a/svg/index.html +++ b/svg/index.html @@ -3,7 +3,7 @@ - games.directory · Activity Globe (SVG) + Orbit · Activity Globe (SVG)
- + @@ -98,7 +98,7 @@
g
-
games.directory
+
Orbit
Live activity · worldwide
diff --git a/svg/layers.js b/svg/layers.js index f290a92..cdd4f3d 100644 --- a/svg/layers.js +++ b/svg/layers.js @@ -1,4 +1,4 @@ -/* games.directory globe — SVG render layers +/* Orbit — SVG render layers * * Every visual element is a self-contained layer object: * { name, z, rebuildOn?, build(e), resize?(e), simulate?(e), draw(e) } diff --git a/svg/main.js b/svg/main.js index 3230c51..11da0ce 100644 --- a/svg/main.js +++ b/svg/main.js @@ -1,11 +1,11 @@ -/* games.directory globe — SVG entry point +/* Orbit — SVG entry point * * Modes: * • clean (default) — the production hero: globe + brand + live ticker, no controls. * • demo (?demo) — adds the FPS meter and the full control / "Scene & effects" panel. * * Scene source (all validated against the schema before use): - * • window.__GD_SCENE__ inline embed from the platform (highest priority) + * • window.__ORBIT_SCENE__ inline embed from the platform (highest priority) * • ?config= fetch the per-deployment config JSON * • ?demo the demo's own localStorage * • otherwise schema defaults @@ -33,7 +33,7 @@ const data = { HQ, ACTIVITY_TYPES, CITIES, landFeature: null }; const scene = await resolveScene({ demo, configUrl: params.get('config'), - inline: window.__GD_SCENE__, + inline: window.__ORBIT_SCENE__, }); const engine = new Engine({ svg, scene, sim, data }); registerDefaultLayers(engine); diff --git a/svg/scene.css b/svg/scene.css index 2b73b8a..c0ba6c2 100644 --- a/svg/scene.css +++ b/svg/scene.css @@ -1,4 +1,4 @@ -/* games.directory globe — SVG renderer scene styles +/* Orbit — SVG renderer scene styles * * Element-specific styling for the SVG globe. Chrome (vars, body, .stars, * .brand, .panel, .ticker, .scene, .fps-meter, #loading, media query) lives in