Commit Graph
4080 Commits
Author SHA1 Message Date
Sameh Khamis db80c9f141 Stub setBase: imagery is added before photoreal is awaited
An unawaited setBase with photoreal and imagery, followed by another,
added its imagery after the later call had set its own, leaving both.
The imagery now goes in before anything is awaited, as the Cesium port
adds it, and an overtaken call resolves settled: false.
2026-11-11 20:01:20 -08:00
Sameh Khamis ca82e23d94 Conformance: clamped rims and walls are picked; the vector base covers string stops, no background and its restore
draw.shapes.clamped picked only the outlined rectangle and the extruded
ellipse; it now also picks the outline-only rectangle on its rim and the
wall on its face, seen from the south. The stub picks both: a clamped
outline along its ring as a draped line of its outline width, a wall where
its panels cover the pixel.

globe.base.vector also draws roads whose join and cap are legacy zoom
functions of strings, checks that a style with no background shows the
globe through rather than black, and ends by switching to a base without
the vector style, which must draw none of it and drop its credit.
2026-11-11 19:39:26 -08:00
Sameh Khamis 748dc0a156 Cesium: revoke blob object URLs no longer drawn
The object URL store keeps its blob alive, so a blob image's URL, never
revoked, kept every blob ever drawn. A blob's URL is now revoked once it has
not been asked for in a minute with two frames drawn since (so a material,
which loads in the next frame, has started its load); images already
loading or loaded are unaffected, and a blob drawn again gets a new URL.
2026-11-11 19:34:43 -08:00
Sameh Khamis a3ffb33563 Cesium imageryFrames: frames waiting on a tile video let go fail
An evicted (or cleared) tile video is emptied, so it never loads or seeks
again, and every frame queued on it waited forever, leaving its tiles
never finished. Letting a video go now fails what waits on it, and a seek
that does not end within 10 s fails its frame.
2026-11-11 19:30:31 -08:00
Sameh Khamis 9d3e99c831 Cesium draw: a clustered icon set clusters again after setColumns
The wrapper that marks a clustered set for clustering again ran before
setColumns was assigned, so column changes never reclustered; with no rows
moving, positions or shown written by columns left the old clusters drawn.
setColumns is now assigned first and wrapped with the rest.
2026-11-11 19:29:04 -08:00
Sameh Khamis 750dab0123 Cesium vectorBase: transparent where the style paints no background; cancelled tiles not painted
The provider said it had no alpha channel, so a style with no or a
translucent background drew black there. And its requestImage ignored the
Cesium request, so tiles of a removed layer were still painted once their
source tiles arrived; a cancelled request now aborts the paint.
2026-11-11 19:28:13 -08:00
Sameh Khamis 09d1133d90 vectorBase: evaluate as the style specification does; leave out features with no value
- A legacy function without a type is exponential only on a property that
  interpolates and interval on any other (line-join, text-transform, ...);
  a property function with string outputs is no longer categorical.
- step over what is not a number fails, leaving the feature out.
- has, get and legacy filters see a feature's own properties, never
  inherited names such as toString.
- A value that comes to null, undefined or NaN leaves the feature out
  instead of being written to the canvas, which ignored it and drew the
  last feature's colour or width.
- A layer's labels are placed in their features' order, as MapLibre
  places them, not reversed.
2026-11-11 19:27:33 -08:00
Sameh Khamis 72d8dd606d setBase: the last call wins; an overtaken or disposed one changes nothing
A vector setBase awaited its style before changing anything, with no
generation guard, so a slow earlier call landed over a later one, and one
in flight at disposal rejected. Cesium and the stub now count calls like
setPhotoreal and setTerrain, abort the overtaken style load, and resolve
an overtaken call with imagery: [] and settled: false.
2026-11-11 19:25:04 -08:00
Sameh Khamis 5fae3cf485 Draw vectorBase: a MapLibre style's vector tiles painted as imagery
src/render/vectorBase/ is a Cesium-free painter: loadVectorStyle loads
a style and its TileJSON sources and compiles its layers (skipping, with a
reason, what it does not draw), and paintVectorTile paints a Web Mercator
tile on a canvas: background, fill, line and circle layers with filters in
both syntaxes, legacy functions and a listed subset of expressions, and
symbol text labels placed clear of each other inside the tile. Sources are
decoded with pbf and @mapbox/vector-tile, already dependencies. The Cesium
port loads the style before changing the base, draws it as Web Mercator
imagery under the base's other imagery, credits its sources, and claims
vectorBase; the stub loads the style. globe.base.vector serves a style and
tile from data URLs and reads the drawn fill.
2026-11-11 18:24:49 -08:00
Sameh Khamis d9ad7da9d5 GPU icon sets cluster their rows where their segments put them
clusterScreenPoints over each GPU set's shown rows at the frame's
motion-clock time (on their ground when clamped), the members' rows hidden
and one icon a cluster drawn at its seed's size in the set's cluster
billboards, picked as each member. Clustered again after the camera moves
or the set changes (setColumns included), and every frame while rows still
move. Conformance checks take several capabilities; draw.motion.cluster
clusters members that come to rest on their segments.
2026-11-11 18:09:38 -08:00
Sameh Khamis 933969b7da GPU icons draw offsets, anchors, rotations, fades, display ranges and clamped heights
Each row reads its extras from a float texture by instance (texelFetch on
gl_InstanceID), so the 16 vertex attributes hold: pixel offset, vertical
anchor, screen rotation and aligned axis (turned as billboards turn),
fadeByDistance, displayRange, and a ground mode with the heights under its
segment's two ends. Clamped rows are sampled after a frame draws, budgeted
across the port's sets (terrain first, then the drawn surface), and again
when the globe's tiles finish loading. WebGL 1 still refuses these; GPU sets
still refuse clustering. The stub picks icons offset, anchored, turned and
clamped to its ellipsoid, and draw.motion.look checks each on a moving icon.
2026-11-11 17:58:40 -08:00
Sameh Khamis 759308404e draw.motion.live measures from the wall time it drew at
The icon moves past its own width in about a quarter of a second, and a
new renderer's first frame can come that late: the check now reads where
it should be from the wall time after that frame, its delay and its
'not at wall time' unchanged.
2026-11-11 17:33:52 -08:00
Sameh Khamis a043854f27 Timed imagery reads the drawn globe tiles through internals.js
The tiles the globe last drew are a private Cesium field: read through
globeTilesDrawn, whose field the internals test checks the installed
Cesium still declares.
2026-11-11 17:20:58 -08:00
Sameh Khamis ee9de4edda Image fills pulse on the Cesium renderer
A shape with an image fill and animate is no longer refused: the fill's
alpha pulses through its image material's colour, on the surface or
clamped, as colour fills pulse.
2026-11-11 17:16:21 -08:00
Sameh Khamis 20138cb313 Wind streamlines over part of the globe on the Cesium renderer
A windStreamlines grid short of 360 degrees of longitude is no longer
refused: the paths seed inside its rectangle, equal-area, and stop at its
edges. The baker takes the rectangle as optional bounds; a grid round the
globe bakes as it did.
2026-11-11 17:14:56 -08:00
Sameh Khamis 1cc9c45418 Draped lines in the sky's frame on the Cesium renderer
A draped line in the inertial frame is no longer refused: it is held as
given, drawn turned into the fixed frame where its motion clock has the
sky, and draped again each second of that clock, the old ground line
kept until the new one is ready.
2026-11-11 17:12:55 -08:00
Sameh Khamis 9995b35874 Clamped shape outlines pulse on the Cesium renderer
A clamped outline with animate is drawn with a colour material, its rings
sharing one colour, and pulses its alpha through it each frame as the
shape's fill does.
2026-11-11 17:10:30 -08:00
Sameh Khamis 6ec4d5571d Every Cesium draw set takes columns
Sets other than icons take setColumns as the rows the columns make over
the items they hold, replacing every item as set does, as the stub does,
so renderer.shape holds on Cesium and joins its checks.
2026-11-11 17:08:09 -08:00
Sameh Khamis a356d094d5 Timed imagery on the Cesium renderer (imageryFrames)
A layer given a timed source hides its own imagery and draws the frames
its clock shows (the scene's time, or setFrameTime on its own clock) as
Cesium layers just above it: the nearest frame, or in blend mode the later
over the earlier at its share of the way, with the next prefetch frames
loading unseen at alpha 0. Video segments are seen every 250 ms, each tile
its video seeked to the time's share of its length. frameReady names the
nearest frame once every globe tile drawn shows its own imagery. The
check globe.imagery.frames now runs on Cesium, and globe.imagery.video
draws a recorded video's frames.
2026-11-11 17:06:33 -08:00
Sameh Khamis b741b0d5f5 Every set blends as its blend says on the Cesium renderer
Each frame drawn, a set's host turns the draw commands it gave to the set's
blend before the scene sorts them: opaque draws every command in the
opaque pass unblended with depth writes; translucent alpha-blends every
command without depth writes; additive adds colour times alpha without
depth writes, still depth-tested, after the opaque commands and before the
order-independent translucent pass. Ground commands only blend
differently. Lines, shapes, models, quads, meshes and GPU icons take every
blend, live through setOptions (models do not load again); GPU icons no
longer refuse opaque or additive. The contract documents the semantics and
the checks draw.sets.blend and draw.models.blend read the pixels. The
package boundaries own setBlend.js and screenCluster.js.
2026-11-11 16:49:27 -08:00
Sameh Khamis a4a4366b13 Icon sets cluster on the Cesium renderer
Clustered icon sets cluster with clusterScreenPoints over the shown icons
each frame drawn after the camera moves or the set changes. A cluster draws
one icon (icon(count), else a count badge) at its members' mean in place of
the members; a pick on it answers each member, seed first, at the cluster's
position. GPU icon sets refuse clustering. The stub clusters the same way,
the contract documents the semantics, and the check draw.icons.cluster
covers it.
2026-11-11 16:33:21 -08:00
Sameh Khamis d497435b61 Cesium shapes: clamped outlines, clamped extrusions and walls, image fills without draping
Clamped outlines were refused; they are now draped lines, a ground polyline
a ring (a polygon's rings, an ellipse cut in 64, a rectangle's turned
corners) under the shape's pick id. Clamped extruded shapes, clamped walls,
and clamped image fills where the scene has no depth textures were refused;
they now stand on the surface unclamped, the surface height read when the
set is built (an extrusion from the lowest point under it, a wall's foot
under each position). The new conformance check draw.shapes.clamped draws
each kind; Cesium runs it.
2026-11-11 16:17:28 -08:00
Sameh Khamis 19055b2b8b Cesium lines: segments on every mode and style, draped patterns, inertial depth-fail
Segment colours and shows were drawn on draped solid lines only. Any other
segmented line (3D, geodesic or draped; glow, dash, arrow, flow, pattern or
an outlined solid) now draws a primitive a segment, each with its style's
material in the segment's colour under a pick id that reads as the line's,
recoloured and shown in place; an arrow's head is on its last segment, and
a revealed line shows each segment by its share of the length. Draped
pieces swap in with the set's other ground primitives. Pattern lines drape
on a ground polyline of their own, and an inertial line with a depth-fail
style is a primitive turned with the sky each frame. The new conformance
check draw.lines.segmentStyles picks shown and hidden segments of five
mode and style pairs before and after an in-place change; Cesium runs it.
2026-11-11 16:13:56 -08:00
Sameh Khamis c7bb08bfb4 GPU frame timing on the Cesium renderer, where timer queries exist
With EXT_disjoint_timer_query_webgl2 the Cesium renderer lists gpuTiming:
while frame signals have listeners, each drawn frame is timed from preRender
to postRender and a signal carries gpuMs of the newest timing back (a
disjoint one is dropped); queries are reused and let go on dispose. Without
the extension it answers 'none', as before. The new conformance check
quality.signals.gpuTiming pins both; the stub's timed frames carry 0 ms.
2026-11-11 16:00:37 -08:00
Sameh Khamis 8122199887 The Cesium renderer lists modelAtmosphere
Cesium's models already take the atmosphere's scattering, in the stage that
draws distance fog; the capability now says so, and the contract doc says
it follows the sky's fog setting there.
2026-11-11 15:56:50 -08:00
Sameh Khamis d249ef24eb The Cesium renderer lists followAutodetect, and a conformance check pins it
An autodetect follow already rode Cesium's AUTODETECT tracking frame; the
capability now says so. The new check camera.follow.autodetect follows a
still target (range kept, its frame east-north-up on it) and one at orbital
speed (range kept frame by frame, its frame on the target with z up); the
stub and Cesium both run it.
2026-11-11 15:56:22 -08:00
Sameh Khamis 71f0945635 Every image kind draws on the Cesium port, atlas slots wherever an image is taken
Icons on billboards and on the GPU, line patterns, shape fills, quads and
raster shells take a URL, SVG, a blob (one object URL per blob), a keyed
canvas (packed into the GPU icon atlas as it is, by its key) and an atlas
slot as the image it holds. Blobs and canvases were refused on the GPU
path, blobs on billboards, and atlas slots everywhere but billboards. The
new conformance check draw.icons.images draws each kind on still and
receding icons; Cesium runs it.
2026-11-11 15:55:27 -08:00
Sameh Khamis 0e8be0fb78 Icons turned about an axis stand along it on the Cesium port's billboards
rotationMode 'axis' was drawn upright: the item's alignedAxis now becomes
the billboard's (normalised), and a changed axis restyles it in place.
2026-11-11 15:52:56 -08:00
Sameh Khamis b2ca9a7d3c Renderer contract doc: what a renderer does, by role
Documents ROLES and roleOf: a renderer is a whole globe engine, the
application keeps the data, and every member of PORTS sits in one of six
roles.
2026-11-11 15:04:38 -08:00
Sameh Khamis ffbd9fe4c2 Weather: an empty frame tile whose encode failed is encoded again
The shared transparent tile kept a rejected encode, so every later empty
tile failed with it. A failed encode is now dropped and the next empty tile
tries again.
2026-11-11 14:29:35 -08:00
Sameh Khamis 46ad53aa35 A renderer's roles: per-layer lighting is part of the look, and roleOf knows only real members
imageryLayer.lit (a layer shaded by the sun) joins the look with surface
shading. roleOf answers undefined for a member its port does not have, and
the port's own role without a member. The test now fails when two roles
claim the same entry.
2026-11-11 13:43:28 -08:00
Sameh Khamis 21fdc6a332 The renderer contract names what a renderer does, by role
ROLES sorts every member of PORTS into one of six roles: the Earth (streaming
and building the globe from map sources), scene contents, camera and input,
world queries, the look, and the host and frame loop. The ports follow the
API's shape; the roles say what the engine behind them does, and that the app
keeps the data while the renderer owns everything from a source spec or a
draw set down to the pixels. roleOf resolves a member to its role, the most
specific entry winning. No member changes; a test keeps every member in
exactly one role and every entry naming a real member.
2026-11-11 13:36:06 -08:00
Sameh Khamis 1f307e0735 Keyless terrain reaches the renderer as quantized-mesh terrain
The contract's TerrainSpec gains quantizedMesh terrain: Cesium's tile
format in the folder at its url, heights above the ellipsoid. Without an
ion key the globe-port map engine asks for Re:Earth's keyless terrain as
it, where it asked for the ellipsoid, so the renderer
draws the same ground; without the terrain capability keeps the
ellipsoid. Cesium's globe port draws it through CesiumTerrainProvider with
the keyless terrain's retry policy.
2026-11-11 09:20:33 -08:00
Sameh Khamis c57e535275 Merge origin/main: street-level links, embed terrain waits, Swedish, and host-supplied weather frames on the renderer's ports
A weather frame source's regional tiles reach the renderer through the
imagery layer's fetchTile, drawn and handed over as PNG bytes, a null tile
one shared transparent tile; the camera-owner watch listens on the
renderer's canvas.
2026-11-11 09:02:11 -08:00
Sameh Khamis db37617fa6 A transit vehicle back in view is turned for the camera as it is now
Its last turn was kept when it came back into view, so a vehicle that
left the view while the camera moved, and came back after the pass for
the camera's new pose, kept the turn from the old pose until the camera
moved again. Coming back into view now clears its last turn.
2026-11-11 08:38:58 -08:00
German Khokhlov aa95c2c25f Merge pull request #1531 from quanticsoul4772/upstream/firms-age-rounding
fix(fires): show a 47.6-hour-old detection as 2d, not 48h
2026-11-11 20:24:53 +04:00
Sameh Khamis 37d44c3364 A transit vehicle coming into view is turned along its course at once
The rotation pass reprojected courses only when the camera moved, a poll
marked a course, or a vehicle was moving. A vehicle that entered the view
or was shown on a later visibility sweep (its ground height arriving
after its poll) kept the icon pointing up until one of those happened,
under a camera that held still. The visibility sweep now marks the
rotations for the next pass when it changes what is in view or shown.
2026-11-11 08:16:27 -08:00
German Khokhlov 1c08482fa8 Merge branch 'main' into upstream/firms-age-rounding 2026-11-11 20:14:57 +04:00
Sameh Khamis 6fc1aaff02 A wreck is selected only by a tap exactly on it
The shipwrecks layer reads the click's top hit, as it read the scene's
exact pick before, not the touch contact search's wider hit: a tap that
misses everything near a wreck selects nothing, and a tap near another
layer's contact closes an open wreck card.
2026-11-11 08:09:54 -08:00
Sameh Khamis 46c98796de News country badges are painted at the scene's pixel ratio
A badge's count image is sized by the renderer's own resolution scale
(its quality port's pixelRatio, 1 while that is browser recommended), as
the other icon sets are, not by the device pixel ratio.
2026-11-11 08:07:36 -08:00
Sameh Khamis 3143d106ce Coasting fleet icons stay above the ground, as the CPU coast keeps them
Past its fix a coasting aircraft or military icon is never drawn lower
than COAST_FLOOR_LIFT_M over the ground the layer's floor cache knows,
as floorCoastedPosition keeps the tracked one. The renderer cannot read
that ground, so the planner reads it along the coast arc and plans the
coast in pieces where the ground rises under it: the arc as it is while
the ground stays clear for the lookahead, one-second pieces of the same
arc lifted and climbing where the ground lifts it, and a lifted hold
once the coast is over. Unknown ground is read again on the next plan;
a coast from above any terrain is never read.
2026-11-11 08:07:36 -08:00
German Khokhlov 98b642869e Merge pull request #1113 from asturksever/pr/street-level-show-action
feat(street-level): "show me X on Street View" — assistant action, view field and share link
2026-11-11 19:13:30 +04:00
German Khokhlov 71797427d6 Street Level: a posted view whose camera was taken stands down whole again
Applying the rest of a posted view after the camera was taken during its
terrain wait still let it change the camera: stop_tracking dropped a follow
the user had just started, and annotate_map framed the view's marks. A
camera taken during the wait now ends the view again, as before. The 2 s
terrain timeout and the per-view catch on the queue stay.
2026-11-11 19:01:58 +04:00
German Khokhlov 0ebc09079d Street Level: polar look-at, a bounded terrain wait, takeovers during the flight
- The look-at longitude wraps fully, so a tilted camera at a pole gives a
  point on the globe. The strict off-globe check on street_level is undone:
  points are clamped again, as before.
- A posted view that fails is answered, and the views behind it still apply.
- A posted view waits at most 2 s for the terrain under its camera, then
  keeps its own estimate.
- A camera taken during that wait stays where it is: the rest of the view
  applies, and only its photos stand down.
- show_street_level keeps a search or a press on the globe made during its
  own flight: it adopts only its own navigation stamps on landing, and a
  gesture is never forgiven.
2026-11-11 18:02:15 +04:00
Said Turksever ae66d07575 i18n(sv): the PR's 27 Street Level strings
Main added a Swedish catalog in #1630, so the catalog test failed on the
strings this PR adds. They use the catalog's terms (Gatunivå, nyckel,
bilder på gatunivå, vyns mitt).
2026-11-11 12:16:58 +00:00
Said Turksever 43893697aa Merge upstream main into pr/street-level-show-action 2026-11-11 12:15:18 +00:00
German Khokhlov 4fd36c44e0 Street Level: a replacement keeps its own state, and a posted view stands down
- Releasing a held viewer frees the old source's adapter without resetting
  the panel, so a replacement's error, outcome and armed OPEN survive; a
  cross-source replacement drops the old photo's details and marker.
- The action holds the open photo only for its own switch-off: a source
  switched by hand during the load stops it and reports cancelled.
- A posted view waiting on terrain watches the camera and stands down after a
  navigation or a globe press; a flat or straight-down camera asks no terrain.
- An arming link opens the panel without persisting the layout, and a posted
  view's street-level step runs as programmatic.
- An off-globe street_level point throws TypeError.
- zh-Hant uses the file's wording for the new strings; README and
  CURRENT-STATE count 35 tools.
2026-11-11 16:05:26 +04:00
German Khokhlov 14db73f201 Merge pull request #1630 from Kajjan7610/sv-locale
i18n: add Swedish (sv)
2026-11-11 14:37:04 +04:00
German Khokhlov 45d9ff1d86 Merge branch 'main' into sv-locale
Translate the 148 strings main added since (mostly the News layer) and
prune the 5 it no longer uses; keep both Hebrew and Swedish in the
language lists.
2026-11-11 13:59:40 +04:00
German Khokhlov 45a33b54df Street Level: docs for the OPEN exception, panel freshness and what stops a request
- SECURITY.md: OPEN also takes the link's point when the screen centre
  cannot be picked at all.
- TOOLS.md: the panel's own link opens Street View only for a result issued
  in the last five minutes; an older one only arms.
- Changelog: the hiding modes stop a request, collapsing the panel does not;
  failure cards are in the interface language.
- CURRENT-STATE: a posted view without a point grounds its look-at too.
2026-11-11 13:46:35 +04:00