Commit Graph
4581 Commits
Author SHA1 Message Date
Sameh Khamis 84d3e7b5ce Merge pull request #1770 from bilawalsidhu/vessels/track-head
Vessel tracks end at the vessel
2026-11-16 13:49:17 -08:00
Sameh Khamis a9990018ea Stories: name the Opened in GEV toast for what it is 2026-11-16 13:48:14 -08:00
Sameh Khamis a5065743d9 Merge remote-tracking branch 'origin/main' into stories/gev-stories 2026-11-16 13:41:09 -08:00
Sameh Khamis 1f6fc86c1a QA: Play on a paused story link goes on from its time 2026-11-16 13:41:09 -08:00
Sameh Khamis 20f6ceb74c Scene document: accept the Stories fields only from version 7
stories, storyThumb and storyTags arrived with version 7, so they are
gated by version like anchors and dataPacks.
2026-11-16 13:40:17 -08:00
Sameh Khamis 1fa053e22d Share link: restore() reports false when the hash is not a share state 2026-11-16 13:38:42 -08:00
Sameh Khamis de0be208da Scenes: an import counts appended packs as built in, as drafts do 2026-11-16 13:37:51 -08:00
Sameh Khamis c8b440dded Scenes: SAVE TO STORIES and tags roll back when the project cannot be saved 2026-11-16 13:37:21 -08:00
Sameh Khamis 85c9f95838 Stories: Back into a deleted story's entry clears ?story= from the address 2026-11-16 13:36:13 -08:00
Sameh Khamis 26893ae37e Vessel tracks end at the vessel
The selected vessel's track drew every fix it held. Following the world
clock, it ran ahead of the icon to the vessel's newest fix; live, it
stopped at the last fix while the icon moved on from it. A change of time
restarted it from a single point until the track at the new time arrived,
so it went blank at every step.

- The track draws the fixes at or before the time the vessel is drawn at;
  live, every fix.
- Each frame a head joins its last drawn fix to the icon where it is drawn,
  as flight tracks do; none past TRAIL_HEAD_MAX_M (20 km), where the clock
  has moved beyond the fixes the track holds.
- A change of time keeps the track, drawn up to the new time, until the
  track at that time replaces it.
2026-11-16 13:35:38 -08:00
Sameh Khamis 7a0b649bf5 Stories: remove unreachable prototype paths
GEV stories never explore, carry no world time and are never live:
drop the resume play state, Jump to live, the exploring branches and
world-time arguments, the overridden play button rules, and the hidden
rail and fill. The legend reads a plain field instead of a mock one.
2026-11-16 13:35:05 -08:00
Sameh Khamis f4b535d89e Stories: remove the Mute button, which controlled nothing
Scene media plays muted and offers no audio control to wire it to.
2026-11-16 13:32:38 -08:00
Sameh Khamis 4fa80fb18c Stories: a teardown that times out cannot undo the restored view
directorSettled now tells a timeout from settlement, and on a timeout
revokes the scene's layer cleanup still in flight before Close puts the
view back.
2026-11-16 13:31:51 -08:00
Sameh Khamis 0a39b05cdb Authoring: pick any scene again, and select the first scene on load
Restores the scene picker and its selection on load, after a delete and
after an import, so PLAY and NEXT work after a reload. Open in GEV
selecting a shot and NEW SCENE stay as they are.
2026-11-16 13:30:22 -08:00
Sameh Khamis 1cb3e88027 Scenes: drop a wall-clock check from the resumed-hold test 2026-11-16 13:29:58 -08:00
Sameh Khamis 76d203c8f1 fix(vessels): back at live, drop a snapshot still loading at a time so the live poll goes out at once (#1769)
Pressing Live while a timed snapshot load was in flight left the live poll
waiting on that load. The live poll returned early, so the map showed no
vessels until the next refresh. The live poll now drops a timed load still
in flight, and loadAt shares the same dropLoad helper.
2026-11-16 13:28:17 -08:00
Sameh Khamis 8734f5e515 Stories: Play resumes at the exact paused or sought moment
startScene takes fromProgress and starts partway into a shot: the camera
goes on along the rest of the flight, the hold waits only what is left
and the scene clock carries on from the same point.
2026-11-16 13:24:59 -08:00
Manjunath fec84dbf78 Address Stories review feedback 2026-11-16 22:35:07 +05:30
Manjunath 2edcd5bc69 Fix Stories history and paused playback 2026-11-16 21:38:14 +05:30
Sameh Khamis 3d49ba588f Merge pull request #1762 from bilawalsidhu/perf/vessel-motion-segments
Vessel playback moves icons on the renderer's clock
2026-11-16 08:06:26 -08:00
Manjunath 472cc35c47 Stories: phone entry, centred framing, review follow-ups
- On GEV's phone layout, where neither the style readout nor the account
  avatar shows, the Stories button goes icon-only under the corner-actions
  column instead of covering the top row of icon buttons.
- Explore frames its start view and a picked story in the middle of the
  map it leaves visible (beside the feed, above the phone sheet), with one
  short correction if that area moved during the flight.
- The share icon stays visible in icon-only header buttons.
- A world clock nothing moved while Stories was open (no jump, same mode
  and rate) is left alone on Close.
- Card images use the globe's own Esri tile URL; the credit list keeps the
  application's full-screen placement on phones.
- Tests cover the live and playing clock restores, the clock coming back
  after the share state, the tile-settling hold being released (settled,
  10 s, Close), the visible-map aim, and the near-end Play fix in the
  director's real order. One changelog fragment covers the PR.
2026-11-16 21:08:23 +05:30
Kevin Rajan 8a0953c35d fix(stories): retain the last shot when replaying near the end (#1724)
Focused follow-up to manjunath22466's Stories contribution.
A paused share link in the final 250 ms is not a completed scene.
Add node:test coverage for near-end Play and true-end replay; update
current-state documentation and the #1724 changelog fragment.
2026-11-16 20:45:25 +05:30
Manjunath b8e622aac8 Stories: reach the globe through the renderer's ports
Main now keeps Cesium behind the renderer contract, so Stories stops
reaching Cesium and the viewer directly.

- Camera: flights, the -60 degree story framing, cancel, the pose saved
  on open and put back on Close go through the camera port; a follow is
  released with stopFollowing.
- Pins: placed in the frame port's postRender from the query port's
  projection and horizon test, still written straight to each pin's
  transform on every drawn frame.
- Tile settling: a continuous-render hold until the globe port reports
  the base settled, for at most 10 s.
- Clock: Close and Back to Explore put back the page's world clock (live,
  or the time it showed, playing on), and leave a clock that is still
  where it should be alone.
- Card images: drawn from Esri World Imagery's own Web Mercator tiles
  while the Esri map stack is active, read as images; no Cesium imagery
  provider is touched.
- THUMBNAIL: the director hands captureStoryThumb the frame port and the
  renderer's canvas, so the scene document's module stays renderer-free.
- Credits: Stories places and keeps visible the application's credit
  line (#gev-credits) and its list as well as the renderer's own display.
- Tests fake the ports instead of a Cesium viewer, and cover pins per
  frame, the flights, the settling bound and the clock restore; the
  share link tests Stories added build their manager over a camera port.
2026-11-16 20:43:53 +05:30
Manjunath 9e9ce1db22 Fix Stories navigation, sharing, and voice entry 2026-11-16 20:12:10 +05:30
Manjunath 5418438339 Stories: GEV scenes as stories on the live globe
A Stories button (top right) opens Explore: a feed of GEV scenes over
GEV's own Cesium globe, with a pin per story. Explore opens at country
level over the first story and, while idle, flies on from story to story
for a minute. A picked story is framed in the middle of the view; a pin
plays its story on a second click. The Story page plays the scene through
SceneDirector with a timeline, chapters, key moments, sources and
background, then Close (or Back) puts the person's camera, clock, layers,
style and AUTHORING selection back. Open in GEV hands the scene to the
Scenes panel at its current shot.

Stories lists the scenes GEV ships with a camera path (while they are in
the project), the scenes saved with SAVE TO STORIES in AUTHORING, and the
person's other scenes as drafts. The person's own stories live in the
project on this device, so they have no Share; a link to a story that is
not here opens Explore and says so. Each shipped story's
context comes from what GEV knows: what it shows, the place each shot goes,
and each layer's data sources as DATA_SOURCES.md lists them; the Nepal
story carries the event pack's facts and CC BY-NC sources. Card images are
a captured THUMBNAIL or drawn from the keyless Esri World Imagery.

AUTHORING has no scene picker: it starts with no scene, NEW SCENE (or
CAPTURE SHOT) makes one, and Stories' Open in GEV selects one. Before SAVE
TO STORIES it offers topic tags and THUMBNAIL. A scene's stories flag,
storyThumb and storyTags are saved with the project and kept through
export and import.

Only the closed state loads with the page; the screens, styles, story data
and controller load on first open. Stories keeps its place in the query
(one history entry per screen) and holds the share link's hash writes
while open. Keyboard input and voice tools stay with Stories while it is
open. Explore's pins move on every drawn frame without asking for frames;
the idle tour and tile settling are bounded.

All strings are translated in the 13 locales.
2026-11-16 20:12:10 +05:30
Sameh Khamis 0a0c6a0e5b Vessel playback moves icons on the renderer's clock
While the timeline plays or is scrubbed, each vessel icon is handed to the
renderer as a motion segment along its track (a straight piece of at most
10 km between two fixes, on the scene clock), as aircraft already are. The
layer writes an icon again only when its segment runs out or the time
moves back before it, instead of moving every icon on the CPU every frame.

Behaviour is kept:
- Icons follow the same great-circle track between fixes (a 10 km chord
  stays within 2 m of it) with the same course.
- A vessel still appears TIMELINE_UNSEEN_MS before its first fix and
  hides again when the time moves back before that.
- Cards, the selected vessel, ship models and the vessel the bridge camera
  rides are read where they are every frame; the rest within
  HIDDEN_FOLLOW_MS, as before.
- Position reads (getAllPositions, getNearby, the focus pass, the
  detection overlay, single-vessel lookups) return where the icon is drawn
  at the world time.
- Going live, each icon holds where its segment last drew it, unless a
  live update has drawn it since.
- Trails are unchanged: they are built from the feed's fixes, not from the
  per-frame position.
- Live mode and renderers without the motionSegments capability take the
  previous path unchanged.
2026-11-15 23:56:03 -08:00
Sameh Khamis da81cf743b Merge pull request #1760 from bilawalsidhu/render/renderer-seam
Renderer ports: layers draw, pick and move the camera through a renderer contract
2026-11-15 20:30:44 -08:00
Sameh Khamis a7fe3eebc6 Credits keep their linked words: only the words a source linked are the link
A credit read from markup keeps the first link's own words as linkText, and the Cesium credit display and the credit line link just those words, as the source wrote them (Street Level's "© Mapillary contributors" links Mapillary only). The Street Level gate reads a drawn item's pick id from its draw-set id.
2026-11-15 20:12:14 -08:00
Sameh Khamis 74673f3c85 World overlay: the distance curve is computed in the projection pass, so its result is never boxed
On Node 26 the engine inlined the projection pass's helpers in another order and left distanceScale out, so every label's paint scale allocated a number: 158 B per candidate per frame against the 154 B budget, where main measures 136 B. The curve now sits beside the altitude curve in snapshotAndProject, with the same arithmetic.
2026-11-15 20:12:14 -08:00
Sameh Khamis 256e992372 The contract text speaks of the renderer 2026-11-15 19:20:48 -08:00
Sameh Khamis 9862b2a165 Contract and docs text describe the ports and the Cesium renderer only 2026-11-15 19:08:46 -08:00
Sameh Khamis 1fdf52198d CONTACTS: a selected vessel's subject is labelled as its selection is; test doubles without the new lookup still activate 2026-11-15 18:42:06 -08:00
Sameh Khamis 4b0958b9e8 Merge main (87ab9d2b1, #1758 and the #1757 revert) into the renderer branch
Grounded aircraft turn 3D on the first settled frame: streaming tiles are not a miss. groundSnap's tests keep main's cases against the branch's query port; trackedModelForm.test.mjs (the branch's form of trackedModelRegime.test.mjs) takes main's edits.
2026-11-15 18:42:06 -08:00
Sameh Khamis 2ac157aca2 CONTACTS takes the selected vessel as its subject instead of following the nearest flight
Turning CONTACTS on with a vessel selected made the nearest flight to the view the subject and followed it. The selected vessel is now adopted as if it had been selected while CONTACTS was on; a followed flight still comes first, and with nothing selected the nearest flight is still focused.
2026-11-15 18:33:29 -08:00
Sameh Khamis 87ab9d2b10 Merge pull request #1759 from bilawalsidhu/revert/1757-vessel-labels-merge
Revert #1757 (vessel label pass and fix merge): no gain in the app
2026-11-15 18:28:56 -08:00
Sameh Khamis 725f2f2998 Moving transit allocates nothing per frame: reusable positions, kept lists, and the frame probe back in testing.js
- Scratch and marker positions are a Cesium-free Vec3 (src/geo/vector.js), so writing a coordinate does not allocate.
- The dirty set and the upsert lists are kept between frames instead of rebuilt; patchDrawnIcons reuses its lookup arrays.
- measureFrames and stopFrameProbe live in src/layers/transit/testing.js again.
- Tests: 3000 moving vehicles stay under 8 KiB per frame of layer allocation; moving 500 icons allocates under 256 B per upsert.
2026-11-15 18:27:10 -08:00
Sameh Khamis 33c98118ba Revert "Merge pull request #1757 from bilawalsidhu/perf/vessel-labels-merge"
This reverts commit 15d1855dd3, reversing
changes made to 663b56f620.
2026-11-15 18:18:42 -08:00
Sameh Khamis 50e3974217 Merge pull request #1758 from bilawalsidhu/flights/ground-models-at-once
Grounded aircraft turn 3D as soon as the tiles settle
2026-11-15 18:00:53 -08:00
Sameh Khamis 8dc2371ed8 Merge branch 'main' into flights/ground-models-at-once 2026-11-15 17:53:45 -08:00
Sameh Khamis 2fa89a98ae changelog: grounded aircraft models after the tiles settle 2026-11-15 17:41:58 -08:00
Sameh Khamis d232d9afe4 flights: grounded aircraft turn 3D as soon as the tiles settle
Tiles still streaming no longer count as a failed ground sample: they leave
the retry backoff alone and return the last measured ground, if any, so the
first tick after the tiles settle samples and hands the icon to the model.
2026-11-15 17:41:37 -08:00
Sameh Khamis 15d1855dd3 Merge pull request #1757 from bilawalsidhu/perf/vessel-labels-merge
vessels: cheaper label pass and fix merge during playback
2026-11-15 17:41:27 -08:00
Sameh Khamis 0ab31d4fb8 The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium
- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed.
- Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame.
- Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed.
- Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour.
- Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets.
- QA scripts read the renderer host instead of internals the seam replaced.
2026-11-15 17:03:09 -08:00
Sameh Khamis a0d299523d Merge main (663b56f62, #1755) into the renderer branch 2026-11-15 16:34:05 -08:00
Sameh Khamis 3909c7735a changelog: vessel labels and fix merge 2026-11-15 16:13:56 -08:00
Sameh Khamis 121b69561a timeline: read each entry's time once when merging runs
mergeTimelineRuns read an entry's time again on every comparison, and the
vessel layer passed a new arrow for every vessel. Times are now read once
into arrays, the leading older entries the loop would keep one by one are
sliced in one step, and the layer passes one function. The result is the
same entries in the same order; a test checks 3,000 random merges against
the previous algorithm.

Measured in the browser, one implementation per page, 9,000 vessels with
240 kept fixes each, 5 alternating pairs: 65-87 ms -> 57-61 ms per snapshot.
2026-11-15 16:13:28 -08:00
Sameh Khamis b65bb86db3 vessels: project label candidates with the camera read once per pass
The label pass projects every vessel in view each time it runs. It asked
Cesium for each one, which reads the camera and allocates for every point.
createWindowProjector reads the camera's matrices and the canvas size once
and runs the same arithmetic in the same order, so the window positions are
the same numbers (a test compares them bit for bit with Cesium); outside a
3D perspective view it asks Cesium as before.

Grid cells are keyed by number, a cell's candidate is made only for its
first vessel and updated in place, and whether a name is worth a card is
kept per vessel until its name, MMSI or id changes.

Measured in the browser (perf harness, 9,000 vessels, 1 min/s): the label
pass 33 ms -> 11 ms, the forced visibility pass 42 ms -> 27 ms.
2026-11-15 16:13:28 -08:00
Sameh Khamis 663b56f620 Merge pull request #1755 from bilawalsidhu/render/world-time-hold
Vessels following the clock: draw at the display's rate, move drawn vessels on a half-pixel step
2026-11-15 13:45:49 -08:00
Sameh Khamis 9a568020fb changelog: vessel playback frames 2026-11-15 13:35:35 -08:00
Sameh Khamis 1f6e8914f2 vessels: move drawn vessels following the clock once they would move half a pixel
A profile of about 9,000 vessels following a playing world clock spent
~13 ms of every frame in the clock pass, moving every drawn vessel a
fraction of a pixel, and ~4 ms more re-uploading their billboards.

- Drawn vessels move again once the fastest would have moved half a pixel
  on screen at the speed each last moved (measured from the world time it
  was drawn at), at least once a second, and at once when the camera moves
  or changes height by a tenth of its height or the view zooms. A pass that
  holds them back asks for a frame, so a paused clock settles on the time.
- Hidden vessels move a share of them each pass, each within 250 ms, rather
  than all of them in one frame; the visibility pass moves one coming into
  view to the time first.
- A vessel's three positions are written from one surface point and normal
  (Cesium's own formula) instead of three fromDegrees calls; the unused
  normal is dropped. The great-circle step builds no arrays.

The pass falls from 4.6 ms to 0.37 ms a frame on average in a benchmark of
9,000 vessels (3,000 drawn) at 240 frames a second.
2026-11-15 13:35:11 -08:00