Commit Graph
72 Commits
Author SHA1 Message Date
Sameh Khamis 0b1dc325bc feat(render): a renderer can draw weather: the weather capability adds globe.weather (clouds, fog, haze, rain and snow, 0 to 1, and the wind they drift on); the view shows the conditions observed under the camera, and the Display panel's Weather group sets them by hand 2026-11-13 11:02:56 -08:00
Sameh Khamis 90695db611 conformance: draw.shapes.lit shows the globe again however it ends 2026-11-11 20:57:51 -08:00
Sameh Khamis 9160e48b40 test(conformance): draw.shapes.lit needs globeVisibility, hiding the globe, and shows it again after 2026-11-11 20:28:02 -08:00
Sameh Khamis 727a6a2f5e Conformance: draw.shapes.lit, a lit extruded shape's walls shade by the light
A grey block 300 m tall, seen from 3.3 km south and 1.5 km up looking
north: the wall facing the eye must be brighter than half its colour, as
the renderer's own lit solids draw it, and its top must shade unlike its
wall. It reads pixels, so the stub skips it.
2026-11-11 20:13:19 -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 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 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 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 619c19ea67 Application extras come from the renderer plugin; framing, occlusion and panel drawing are contract ports
A renderer plugin may supply applicationHooks(renderer) for what only its
renderer has (map engine, own credits, stale commands, QA handles). What every
renderer should do moves onto the contract: controls.keepEarthFramed (behind
the keepEarthFramed capability), query.occlusionTest (behind occlusionTest),
and panel drawing, which keepPanelRendering now does through resize and
frame.renderNow through the contract. renderNow throws when the frame fails to draw.

The Cesium port installs its zoom-out guard through keepEarthFramed (a setView
no longer cancels its turn) and answers occlusionTest with the scene's probe;
the stub answers it with a horizon test.
2026-11-10 21:17:56 -08:00
Sameh Khamis f1817756ed Read conformance pixels where they are drawn, and skip them only by the harness
Checks that read drawn pixels no longer skip when nothing is drawn: a
harness says pixels: false when its renderer draws only models into
pixels, as the stub, and a renderer that draws an icon, an
outlined line or a raster shell as nothing fails. The shell's patch is
read where the ground below projects, in the units readPixels crops in.
The contract notes what changed in version 0 besides additions, and
loses two stale lines.
2026-11-10 09:46:12 -08:00
Sameh Khamis f834903950 Place the stub's camera exactly from a direction and up
The contract places a view given as direction and up exactly, but the
stub turned it into heading, pitch and roll first, so a thousand small
turns straight down drifted by a hundredth. The new check
camera.setView.exact holds the stub and Cesium to it; both pass.
2026-11-10 09:45:49 -08:00
Sameh Khamis 3f194d0eec Check that a raster shell draws its image, not only that it says so
draw.field.rasterShell now reads the middle of the frame, which the shell
covers, once 'drawn' has come. A renderer that draws a probe line into
pixels must draw the shell there too; one that draws neither, like the
stub, leaves the pixels unread.
2026-11-10 09:23:43 -08:00
Sameh Khamis 72a322f7ce Record Cesium references for the quad, mesh and field scenes
Every conformance scene now has a reference. The quad and mesh views look
at their item's middle, where the mesh's base was cut off at the bottom of
the frame before.
2026-11-10 09:07:51 -08:00
Sameh Khamis 149f8aad4d Settle a line outline's width as the whole outline, half on each side
A solid line's outline.widthPx is the outline in all, half on each side and
inside the line's width, as Cesium draws it. The range ring's pulse fronts
pass their halo width whole again, so they keep main's look, and the
conformance check draw.lines.outline pins the width. The lines scene's
outlined line keeps its 2 px edge each side and its references are
re-recorded.
2026-11-10 08:59:36 -08:00
Sameh Khamis 74d6d97b29 Draw the Global Context range ring and its pulses through the draw port
The ring, its sonar fronts and the band behind them leave Cesium: the
ring and each front are one solid line with an outline, the band is one
flat unpickable ellipse at the rim filled with a canvas painted from the
pulse radii. rangeRingCesium.js goes, and the Cesium allow-list is empty.

Solid lines take an optional outline ({color, widthPx}, inside the
line's width on each side), drawn in the line's own pass so a
translucent halo never darkens where it meets the core; both colours
change in place, and outlined lines never settle into the static batch.
An unclamped image fill takes a new canvas in place: copied into its
texture when the size is the same.

A parked view steps the pulses from the 80 ms timer before it asks for
the frame that draws them, so it draws one frame a step; frames the
camera moves in, or held drawing, step them every frame, and the band is
painted at most every 80 ms. The lines reference scene gains an outlined
line.
2026-11-10 07:48:07 -08:00
Sameh Khamis c8346c9fda Keep shape radii, rim gradients, depth-fail looks, sweep cadence and step camera moves out of the renderer contract
Shapes take their radii in metres; the world annotation ring follows the
camera height itself (ringRadiusAt), resizing on preRender. The radial rim
preset and depthBias go: the launch pad zone draws a canvas image fill made
by the layer. Solid and dashed lines take one depthFail look (solid or
dash) in place of depthFailColor and depthFailDash. sonarCadenceHz goes from
the quality settings: nothing set it, and the sweep moves every 80 ms.

Camera move, look, rotateAround and zoom leave the camera port: the app's pans,
in-place turns, globe turns and zooms are setView views summed over the pose
(geo/eyeMoves), and the Cesium port places a view by direction and up
exactly rather than through heading, pitch and roll. The conformance driver
runs those script steps through setView; the lookAt script turns in place
where it turned about the frame-local axis, and its reference is recorded
again.
2026-11-10 04:08:41 -08:00
Sameh Khamis 46cdeba7fa Remove renderer contract members nothing in the application uses
Drops from the contract, the stub, the Cesium renderer and the
conformance suite: agent paths, renderer-propagated orbits and celestial
draws (orbits stay drawn as icons and inertial lines), scalar raster
fields, lodGroup, volume classification, icon eye offsets, the dash gap
colour, box shapes, courseBlendMs (courseGlide covers easing), relief
surface shading, globe clouds and water, sky atmosphere tuning, heightmap
and quantized-mesh terrain, WMTS and ArcGIS imagery, the batched cached
height read, the quality benchmark and the animated-style and overlay
pixel-ratio knobs. Capabilities clouds, water, celestial, agents, orbits
and benchmark go with them.

The lodGroup check becomes a displayRange check across two sets, the
height-query check uses an extruded polygon in place of a box, the shape
scenes draw extruded blocks where they drew boxes, and the fields scene
draws a raster shell. The shape references are recorded again.
2026-11-10 03:27:10 -08:00
Sameh Khamis 71f2f12f75 Re-record the city scene's references with colour fills shaded as entities shade them
The city and street views were recorded before colour fills were built
with the vertex format their appearance reads, which drew lit faces
darker than the same entities. They have not matched since; these are
the views as the Cesium scene renderer draws them now.
2026-11-10 03:23:24 -08:00
Sameh Khamis 2b60531c3c Merge main through #1634 into the renderer seam
Brings in the CCTV opening camera, the Iceland, Giroc HLS, Taiwan, Quebec,
Ottawa and world camera packs, the world clock and timeline, the zoom-out
limit and registered-only layer state, ported onto the renderer contract:
the sky follows the world time through the frame port's setTime in
preUpdate, the Quebec overlay reads the eye, projects and redraws through
the camera, query and frame ports, launches hide pending missions through
their draw records, and mission orbit rings turn on the scene clock.
2026-11-10 00:31:23 -08:00
Sameh Khamis aea5c3acc6 Merge branch 'sameh/renderer-annotations' into sameh/renderer-seam 2026-11-09 11:35:31 -08:00
Sameh Khamis 2c68fc0248 Conformance: the atlas check makes its canvas slot only where a 2D context exists, not wherever there is a document 2026-11-09 10:21:48 -08:00
Sameh Khamis 1d813a8055 Cesium draw port drapes arrows, draws ellipse radii by camera height and classifies volumes
Draped lines take the arrow style. Clamped ellipses with radii by camera
height are drawn at the camera's height each frame, drawn alone up to
MOVING_SHAPES (counting those a retiring host still draws alone) and
rebuilt past that. Extruded shapes that classify their volume draw as a
ClassificationPrimitive where the scene supports it, and extruded
polygons draw their outline cage. The stub picks clamped rectangles,
ellipses and classifying volumes, outside their holes. Conformance
checks radii by camera height and classifying volumes on both renderers.
2026-11-09 09:23:04 -08:00
Sameh Khamis fcd1c09565 render: Cesium draws wind-streamline fields; the wind layer's flow uses the draw port
The Cesium draw port now implements draw.field for the windStreamlines
kind (src/render/cesium/drawStreamlines.js). It carries the flow shader,
the 30-degree cells, horizon and frustum culling and the path tracing over
from the wind layer. It moves the highlight on the page's own frames, at
most every 32 ms, and only while the field shows, is unpaused, has alpha
and some cell is in view on a visible page. A grid no path runs through,
or one short of the whole globe, is refused. A rebuild that fails draws
nothing and is never told drawn.

The wind layer's GPU flow (src/layers/wind/gpuRendering.js) now builds the
spec, fades it by camera height and pauses it through the draw, camera and
frame ports, and no longer reaches Cesium, so it leaves the Cesium allow
list. The layer runs no animation loop of its own while the renderer draws
the flow; the canvas fallback is unchanged and still takes over wherever
the field is refused. A new conformance check covers the field's 'drawn'
events.
2026-11-09 07:38:06 -08:00
Sameh Khamis 85a04b1367 Cesium effects port draws screenModulation, the marker sweep
The adapter's effects port now has screenModulation: a contract sector
shades points, billboards (labels among them) and icon sets in their own
vertex shaders, swapped into this scene's command list as the primitives
update, and tints models on the CPU after every owner has written its
colour. Geometry and picks are unchanged. It is the sweep the cyber HUD
already draws, carried into src/render/cesium/screenModulation.js and
driven by a sector instead of document settings; nothing is installed
until a sector is set, and disposal gives everything back.

The capability is advertised on the Cesium version the command swap is
tested against; diagnostics list the pass while it draws, and listeners
hear when it starts or stops (a native shader it cannot take stops it).
A set asks for a frame unless it changes nothing drawn: the same sector,
or only the angle of a sweep while no shaded marker was in view.

cyberSonarSector() gives the sector for the cyber sweep; the app switches
to the port in the next commit.

Conformance: the screenModulation check runs on Cesium; new checks read
the pixels (in the band an icon draws, outside it and at radius 0 it dims
to the floor, strength 1 draws it in the colour, clearing restores it) and
check the member is absent without the capability.
2026-11-09 05:27:54 -08:00
Sameh Khamis 90499762f5 Add pointer-driven camera scripts with Cesium goldens, and count wheel lines as Cesium does
Five new camera conformance scripts move the camera by user input: a
left drag that coasts, thirty pixel-mode and thirty line-mode wheel
notches from 5 km, a middle-drag tilt, and Shift and Ctrl drags held too
long to coast. The runner turns input steps into pointer events for a
driver: a move starts where the pointer last pressed or moved and carries
the held button. The golden recorder now drives Cesium's own screen-space
camera controller on a stand-in canvas, with Date on the virtual clock so
inertia is deterministic. The existing goldens are unchanged.

A harness that answers pointer input sets cameraInput and a pointer hook.
Harnesses without it, such as the stub, skip the input scripts.

The input port reported a line-mode wheel at 33 1/3 pixels a line. It now
counts lines as the reference does, 40 pixels a line and 3 lines a page,
so a pixel or line wheel converts back to the same pixels.
2026-11-08 20:08:56 -08:00
Sameh Khamis f9749ac83c Redefine the modulation sector: a sweep over markers with a reach and a floor
ModulationSector gains radius and floor and says what it dims and what it
leaves alone; picks are unchanged and setting or clearing a sector asks
for one frame. The stub names its pass screenModulation, and a
conformance check covers the pass, the frame request and the pick.
2026-11-08 14:37:59 -08:00
Sameh Khamis c87bd38d18 Add fields' alpha, paused, shell detail and a drawn event, in the contract and the stub
windStreamlines takes alpha and paused; rasterShell replaces detailWindow
with a detail image and rectangle and says how shells stack, blend and
update; FieldHandle.on('drawn') says once per change that it is drawn,
never while hidden. The stub fires it on the render after a change, and a
conformance check covers it. The Cesium adapter has no fields yet.
2026-11-08 14:19:52 -08:00
Sameh Khamis c32bf3177d Add hillshade surface shading and draw it on the Cesium globe
The globe port takes the globe's material only when it is free, follows a
terrain change, lets go of a material someone replaced, and takes it again
once it comes free; idle ticks ask for no frame.
2026-11-08 13:50:38 -08:00
Sameh Khamis 456645f291 Name the surface heights answer against: globe.surfaceVersion and the surface settle kind
A new capability, surfaceIdentity, adds globe.surfaceVersion(): a number
that changes whenever what surface heights answer against changes (base,
terrain or photoreal swapped, the globe shown or hidden) and never on
camera moves or tile loads, so the app can key cached heights by it. The
settle kind 'surface' says whether that surface has loaded what is in
view: the terrain while the globe is shown, otherwise the drawn tiles,
false with neither; a renderer without the capability answers it as base.

The Cesium globe port reads both off the scene, so a base changed around
the port counts too; its versions come from one counter shared by every
port. The stub bumps on real base, terrain, photoreal and visibility
changes. A conformance check and a globe port test cover them.
2026-11-08 13:31:03 -08:00
Sameh Khamis e15cfb3e32 Let shapes choose lit or flat shading, and say how a renderer that cannot drape falls back
ShapeItem.lit picks the renderer's fixed light or a flat colour; omitted,
extruded shapes and boxes are lit and the rest flat, as they were. The
Cesium draw port lights unclamped colour and image fills by it; clamped
shapes still drape unlit. A new reference scene, shapes-lit, draws a lit
and a flat box and square.

LineItem.mode now says a renderer that cannot drape at all draws draped
lines and clamped shapes as overlay, and clampState() says overlay. The
Cesium port says overlay when its context has no depth textures, which
only a WebGL 1 context can lack.
2026-11-08 13:11:25 -08:00
Sameh Khamis 8fe8b8e14d Make SetSpec.drawOrder exact and draw it in Cesium and the stub
Among sets that skip the depth test, a higher drawOrder draws over a lower
one whatever order they were made in, and picks name them topmost first.

Cesium draws the earlier of two opaque near-plane icons on top and picks
it, so the draw port stacks the sets' hosts with a higher order earlier,
ties in the order the sets were made. Hosts trade places only among the
slots draw-set hosts already hold, so no other primitive moves; nothing
moves while every set is at 0. Translucent items blend
order-independently in Cesium and are not ordered by it.

The stub sorts its hits the same way. A conformance check draws two icon
sets at one spot and swaps their orders.
2026-11-08 13:01:36 -08:00
Sameh Khamis 45302e9fbf Bound drillPick's work, pick before styles, and put changed thresholds behind a capability
The query contract now says picks answer against the scene as drawn before
effects, and that a drillPick limit bounds the work as well as the answer:
the renderer stops at `limit` hits and looks through at most
max(limit, 16) things under the pointer. The Cesium query port passes that
depth to Cesium's drill (a pick looking under something unpickable stays
unbounded), a click's drill caches one pass per depth, and the stub counts
unpickable items toward the depth.

CameraPose says fovy and aspectRatio describe the nearest centred
perspective frustum, the exact projection being in matrices().

A changed listener's own threshold is now the capability
cameraChangeThreshold; without it every listener fires at 0.5. The Cesium
and stub cameras have it, measured per listener without touching Cesium's
shared percentageChanged.

Conformance: draw.drillPick checks limit 0, never the surface, nothing over
the bare globe, an unpickable cover, nearest first and a bounded prefix;
query.pickBeforeStyles picks an icon under a mirroring style; the threshold
trace is skipped without its capability.
2026-11-08 12:37:04 -08:00
Sameh Khamis 5c05f9befe Wait for both ends of the unturned draped fill in the rotation check
A draped fill can reach the pick pass tile by tile, so the far end of the
wide rectangle was sometimes not pickable yet in the frame the centre was.
2026-11-08 09:45:47 -08:00
Sameh Khamis 17364d1eee Settle unchanging solid lines into static batches in the Cesium draw port
An undraped solid line (straight or geodesic, without a depth-fail colour,
not revealed, at least half a pixel wide) is drawn by the set's polyline
collection at once, as before. Once the set's lines have not changed for
30 drawn frames, every such line is built into static batches beside the
collection: a primitive of polyline geometries for opaque colours and one
for translucent ones, each line coloured and shown by its own instance
attributes under the pick id it had. A batch builds hidden, off the main
thread, and swaps in for the batch before it and the collection's
polylines once it is ready, each line showing as its item then asks. A
polyline collection works out every line's material every frame; a batch
costs nothing until it changes. The data centre stems (4,362 lines) cost
about 16 ms a frame in the collection and about 0.01 ms settled.

A batched line changes its show, colour and meta in place. One that moves,
or whose colour moves it between the opaque and translucent passes, leaves
its batch, hidden there, for the collection until the set settles again;
when a batch exists and fewer than 64 lines are left in the collection,
they settle after 300 frames, as rebuilding the batch for a few lines
costs more than drawing them. A line in the collection that moves or
changes colour drops a batch still building; a show change does not. A
colour-only change of such a line is now made in place in the collection
too, where it rebuilt the set. A batch whose build fails is reported once
and its lines stay in the collection. Glow, dash, arrow, flow, pattern,
revealed and depth-fail lines draw as they did.

The shared conformance suite checks solid lines left unchanged for many
frames still pick, hide, recolour and move in place.
2026-11-08 00:40:29 -08:00
Sameh Khamis d9db5199ed Add and remove points in place, set only what changed, and recolour material lines in place in the Cesium draw port
A set of unclamped points drawn by one point collection now takes new
points and removals where it is, instead of building the collection
anew; its pick ids and horizon cull follow, and the draw port's version
changes only when pick ids do. A point moved or restyled in place sets
only the members of its look whose values changed, and writes its
position without allocating, so a set moved every frame makes nothing
new. A draped line drawn by a material of its own takes a colour-only
change on its material, and unmoved lines sent again compare their
positions without flattening them. The shared conformance suite checks
points joining and leaving a set one by one.
2026-11-07 23:16:11 -08:00
Sameh Khamis 6286bcfb07 Turn draped rectangles by an optional rotation, and drape image fills in the Cesium port
A rectangle shape gains an optional rotation: radians counter-clockwise,
turning it about its centre in longitude and latitude, as a KML ground
overlay turns; an image fill turns with it. A renderer that predates it
draws the rectangle unturned. The Cesium draw port passes it as the
rectangle's rotation and texture rotation, and now drapes image fills on
clamped shapes, each on a ground primitive of its own that owns its
material, where it refused them before. Hidden image fills are not built
until they show. The stub picks draped rectangles, turned and across the
antimeridian, and a conformance check picks a quarter-turned overlay on
both renderers. The KML importer still draws its overlays itself.
2026-11-07 21:49:34 -08:00
Sameh Khamis 7ad65b2e87 Dash a line's parts behind the surface, and the Draw tool's rubber band there
A line item gains an optional depthFailDash ({ length, pattern16? }): the
parts behind the surface are dashed in depthFailColor, as a dash style
dashes a line. Without a depthFailColor, and on draped lines, it is
ignored; a renderer that predates it draws those parts solid. The Cesium
draw port gives the depth-fail appearance a PolylineDash material, and a
change of dash is a new look. The Draw tool's rubber band uses
{ length: 16 }, the dash its old entity asked for (that entity, a dynamic
polyline, never drew its depth-fail material, so the parts behind the
surface were hidden before the tool moved onto the draw port).
2026-11-07 21:49:25 -08:00
Sameh Khamis 90e73f2ef2 Read the eye's follow frame through the camera port and take share-follow off the Cesium list
The camera port gains an optional followFrame() (capability followFrame):
the frame the eye is placed in now, as a column-major 4x4 matrix to ECEF.
Once a follow has framed the camera it is the follow's own frame
(east-north-up, or the orbit frame an autodetect follow chose), under
lookAt the target's east-north-up frame, otherwise the identity. setView
places a world pose and keeps that frame. The Cesium port reads it from
camera.transform, only when the capability is on; the stub from its own
eye frame. A conformance check covers the world, lookAt and enu-follow
frames, the offset in it, and setView keeping it.

src/ui/shareFollow.js now reads the pose, the frame and the follow offset
through the camera and frame ports: a shared offset is re-expressed in the
follow's own frame as before, satellites included, and the eye is placed
with setView at exact heading, pitch and roll, so a near-vertical view
keeps its roll. placeFollowEye returns false on a camera that cannot say
its frame. offsetFromHeadingPitchRange moves to src/geo/frames.js, shared
with the stub.
2026-11-07 21:49:25 -08:00
Sameh Khamis 5370feb825 Report model load failures to model sets, and bound the tracked model's retries again
The renderer contract gains an optional event on model draw sets,
`on('loadFailed', (id, message) => ...)`, beside `ready`: a model's url
failed to load, once per failed load. The item stays in the set drawing
what it drew before; removing it and adding it again tries at once. A
renderer that cannot tell a failure may never fire it.

The Cesium draw port fires it once Cesium is done with the frame it
raised the error in, and not for a load that was superseded or whose item
went. The stub fails urls under `stub-fail:`, telling each load once. A
conformance check (`draw.models.loadFailed`) runs on both, with a model
url the dev server does not serve for Cesium.

The flights and military layers use it in place of rewriting every
unloaded model every 5 s. A fleet model whose load failed is removed and
added again 5 s later. The tracked model gets back its per-selection
budget: a failed load is let go and tried again 1.5 s later, and after
three failures the contact stays 2D until another is selected, as
before the models moved onto the draw port. A good load retires the
budget, and a model that loads after all is kept.
2026-11-07 19:44:15 -08:00
Sameh Khamis 2e91579f8f Add a globe visibility getter to the renderer contract
The globe port could show or hide the globe surface but not say whether it
is shown. It now has an optional isGlobeVisible(), gated by a new
globeVisibility capability, in the Cesium adapter, the stub and a
conformance check. A Cesium scene without a globe does not offer it, so
callers keep their own default for an unknown surface.

The OSM overlays, the CCTV ground regime and the submarine cable drape now
read the getter instead of the scene's globe. cableClassificationTypeForScene
takes the viewer rather than its scene.
2026-11-07 19:44:15 -08:00
Sameh Khamis 20155ff3fa Change Cesium model sets in place, and check models on both renderers
A models set kept one primitive per build and loaded every model again on
any change. Each item now keeps its own Cesium model: an update re-poses it
(position and orientation), and changes its scale, pixel floor, maximum
scale, shading, tint, colour blend, environment map, display range and show
where it is. Only a new url loads again, and the model it draws stays until
the new one is ready. `ready` fires once per load. Each frame before the
scene draws, the set caps models at their maxPixelSize, scales and fades
them by distance, and hides them past the horizon in a horizonCull set. A
load that fails is let go after its update, and stays a failure for
whenSettled until its item changes.

The stub fires `ready` only for a new item or a new url, and draws models
into readPixels as tinted squares. Its harness has a model asset now, so the
model checks run on it. New checks: a model moves, turns and restyles
without loading again, and only a new url loads it; its tint and colour
blend change live.
2026-11-07 15:43:33 -08:00