Commit Graph
265 Commits
Author SHA1 Message Date
Sameh Khamis aea5c3acc6 Merge branch 'sameh/renderer-annotations' into sameh/renderer-seam 2026-11-09 11:35:31 -08:00
Sameh Khamis d9e72dfc8b World annotation renderer draws through the renderer's ports
Areas, buildings, routes, arrows, pins and labels are draw-port shapes,
lines and points, one set per mark, faded by upserting their colours.
Pins pulse their ring and size it by camera height; arrows drape.
Ground heights come from the heights service. The module leaves the
Cesium allow-list.
2026-11-09 10:34:53 -08:00
Sameh Khamis 6b4b04d082 Cesium draw port builds colour fills with the vertex format their appearance reads
Unclamped colour fills are built with position and normal only, as the
entities' colour batches build them; image fills keep texture coordinates.
With the default format Cesium packed texture coordinates with the normals
and the colour appearance decoded the packed value as the normal, so lit
colour fills (an extruded column, a box) shaded darker than the same
entity.
2026-11-09 10:27:20 -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 c148e2888f Cesium draw port pulses shape alpha and recolours shapes in place
Shapes take an alpha pulse (from, to, periodMs, forever), run before each
frame, with frames asked for while anything drawn pulses. Any other pulse,
or one on a fill that is not a colour, is refused before anything changes.
An upsert that changes only colours, pulse, show or meta is written into
the drawn primitives: unclamped shapes through their instance colours and
ring materials, clamped colour fills through their ground primitive (or
once it is ready). Shapes not yet drawn, or drawn opaque and turning
translucent, rebuild as before.
2026-11-09 09:50:30 -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 2a26d13fff render: wind relief is the globe port's hillshade; the wind layer no longer reaches Cesium
The wind relief now asks the globe port for hillshade surface shading at
0.28 instead of building a globe material itself; the Cesium globe port
draws the same view-directed shading, over terrain normals or the globe's
curvature, and the unbound provider now lists surfaceShading. The wind
layer's canvas flow, bounds, imagery fade and render requests go through
the camera, frame and query ports, so src/layers/wind/rendering.js and
relief.js leave the Cesium allow list.

A refused shading request is taken back so it never shows after Wind is
off, and a camera height that is not a number falls back as before.

The application layers and standalone catalog entries no longer load the
unbound factories themselves: a viewer with no renderer bound
needs render/cesium/unbound loaded first. The contract and current-state
docs say what the Cesium adapter's fields and surface shading do now.
2026-11-09 08:13: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 50cb7bd5f4 render: Cesium draws raster-shell fields; weather shells use the draw port
The Cesium draw port now implements draw.field for the rasterShell kind
and advertises the 'fields' capability. The shell surface (a raised
rectangle with a detail window, drawn in primitive order without depth
writes) moves from the weather layer into src/render/cesium/drawFields.js.
A new rectangle or height is drawn invisibly first and swapped in whole,
and 'drawn' is told in the frame of the swap. A stage of older content
never replaces the drawn one while newer content decodes. A field hidden
mid-stage keeps building it.

The weather shell (src/layers/weather/shellRendering.js) now drives one
field through the draw, camera, frame and globe ports and no longer
imports Cesium, so it leaves the Cesium allow list. The wind shell on
photoreal hosts also draws through draw.field. The conformance page runs
each visual scene on its own, so a kind the Cesium renderer does not draw
yet (scalarRaster) fails only its own scene.
2026-11-09 07:02:54 -08:00
Sameh Khamis cf72c7857d Cyber contact sweep goes through the effects port, off the Cesium allow-list
The cyber sonar scene now sets a screenModulation sector each tick that
draws and at the renderer's sonar cadence, and clears it outside the Cyber
map theme. A renderer without the capability, or one that stops listing
the pass, leaves markers native and reports the contact GPU unavailable,
while the HUD sweep keeps its clock. The old Cesium command wrapper is
removed; cyberSonarGpu.js and cyberSonarScene.js leave the allow-list.
2026-11-09 05:59:48 -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 26633106fc Traffic surface keys and readiness through the globe port; draped lines fall back to overlay where the scene cannot drape
The traffic layer keys its cached road heights by the globe port's
surfaceVersion() and waits on isSettled('surface') instead of reading the
scene through render/cesium/surfaceState.js, which is gone. Heat-lines are
always asked for draped; the layer no longer checks whether the scene can
drape and drops them. The traffic layer and application/sources no longer
reach Cesium, and src/layers/traffic/rendering.js leaves the Cesium list.

Where the Cesium renderer cannot drape (no depth textures), its draw port
now draws every draped line over the surface, as the contract asks: along
the surface's curve between its positions, in its colour where the surface
hides it, hidden past the horizon (tested along its arc, shown in 2D). A
segmented line runs from its first shown segment to its last, in its style
colour. A line whose positions hold what they held takes a new colour in
place, so pulsing jam lines build nothing per frame; one that moves is
built anew alone.
2026-11-09 03:10:29 -08:00
Sameh Khamis f53f691a80 Ground snapping and mesh floor sampling through the renderer ports, off the Cesium list
src/services/groundSnap.js and src/services/meshFloorSampler.js no longer
reach Cesium. Whether the surface has streamed comes from the globe port
(the snap waits for the 'tiles' and 'surface' settle kinds; the sampler
runs only with the globe hidden and 'surface' settled), the camera height
gate from camera.pose(), heights from the query port, and the maths from
src/geo/ellipsoid.js. The raw exclusion path is gone: callers see through
their own draw sets by id. Cockpit's ground probe names the tracked
contact's icon and model sets, which the flights and military layers keep
on its entity record (groundSets), instead of the tracked holder object.

Probing is unchanged: at the caller's point, up to eight readings per cell
about 17 m apart, a read answering from the nearest one.

The application operations entry is now Cesium-free: a viewer with no
renderer bound needs ./render/cesium/unbound loaded first. Tests that used
to get the adapter's factories through ground snapping load it themselves.
2026-11-09 01:55:36 -08:00
Sameh Khamis 9d4e438e63 Merge branch 'sameh/renderer-transit' into sameh/renderer-seam
# Conflicts:
#	src/render/cesium/draw.test.mjs
2026-11-09 01:00:43 -08:00
Sameh Khamis 8bcaced6ad Take the input dispatcher off Cesium: pointer input from the renderer's input port, picks from the query port
The dispatcher now builds on renderer.input and the query port, with
positions as plain {x, y}. Its viewer access count is zero and it leaves
the Cesium allow-list. Layers that read the raw engine pick read the Hit,
drawHit or event.native instead, and pickRegistry's resolvePickId and
pickContact take a Hit, with the raw versions kept in the Cesium adapter.

rendererOf gains findInput, provideUnboundInput and provideNativeClick.
event.native carries the engine's pick, drill and pickWindow, and picks
through the follow helper happen inside it. An unbound input port
survives the viewer being bound until it is released.

The query port's pick memo is now per task rather than per frame,
because Cesium's own picks advance the frame number. A click on the sky
skips the depth pass when nothing is on the ray. Touch contact search
keeps its eight-deep drill in a 14x14 window.
2026-11-09 00:47:30 -08:00
Sameh Khamis 347427f83d Draw transit vehicles through the renderer ports, off the Cesium list
Transit drew its vehicles into two Cesium billboard collections and culled,
turned and floored them through the Cesium scene. It now draws them as two
draw-port icon sets, still and moving, registered with the sprite order by
set id in the same places. Each marker is a plain record; a frame writes the
changed ones in one upsert per set, and markers taken out in one task go in
one removal. Clicks read the draw-port hit.

Visibility uses the query port's horizon test and the frustum planes of the
camera port's pose. Icons stay turned in screen space by an exact projection
through the query port, the same answer the Cesium helper gave. The flat
globe is told from terrain by asking the height service once per surface
change; floors are read again when the answer flips. The mesh floor sampler
sees through the layer's sets by id. The camera pose and surface version are
read once per task.

The Cesium draw port now moves and turns an icon without restyling it. The
GL upload probe moves to src/render/cesium/uploadProbe.js, which the QA
scripts hand to the frame probe; the QA scripts read the billboards drawn for
each set.
2026-11-08 21:44:22 -08:00
Sameh Khamis 6eb9ceef46 Merge branch 'sameh/renderer-camera-support' into sameh/renderer-seam
# Conflicts:
#	src/render/cesiumAllowList.json
2026-11-08 21:23:46 -08:00
Sameh Khamis 04a764ed86 Draw the Recent Imagery box preview through the draw port, off the Cesium list
The box being dragged was two Cesium entities on a data source of its own.
It is now a clamped colour rectangle in a shapes set and a draped dashed
outline in a lines set, both unpickable, with the same colour, alpha,
width and dash length. The Cesium draw port now redraws a moved clamped
fill in the frame it moves, so the box shows on every frame of the drag.
The fill shows once the box has an area. The outline shows once the box
has any extent, so a drag along one axis still draws a line. The last box
is kept hidden between drags, and the next drag moves it.

markBaseTileset moves to a Cesium-free module, src/render/baseTilesets.js.
The globe port reads it and re-exports it, so a tileset a caller marks
as its base is still draped on. rendering.js no longer imports Cesium or
reaches the viewer and leaves the Cesium allow-list. The application's
tools loaded the globe factory only through it, so embed.js now loads it.
2026-11-08 21:18:56 -08:00
Sameh Khamis 3276a3346e Draw a moving clamped fill every frame in the Cesium draw port
A clamped colour fill (a polygon, a fixed-radius ellipse or a rectangle)
whose upsert changed only its geometry rebuilt its set's ground primitive
batches asynchronously, and each upsert dropped the build in flight, so a
shape dragged every frame never drew. Once Cesium's terrain heights are
loaded, such a fill is now drawn alone where it now is, on a ground
primitive built in the same frame with the same pick id, and hidden in its
batch and in a host still retiring. That mirrors how a moved draped line is
drawn.

A set draws at most MOVING_SHAPES fills alone, counting those a retiring
host still draws; an upsert that would draw more rebuilds as before. A set
whose moved fills have been still for SETTLE_FRAMES drawn frames rebuilds
once, so they go back into its batches. If a second rebuild drops the host
drawing a fill alone before that host is ready, the fill shows again where
the retiring host draws it, unless it is hidden or gone.
2026-11-08 20:49:08 -08:00
Sameh Khamis 00ae80908c Move icons that only move without restyling their billboards
An icon set drawn as Cesium billboards now changes an upsert in place
without walking the whole set when every touched item is already drawn
with the image it has, and writes only the position (and the course
axis that follows it), the pick record and the shown state when an
item's look is unchanged since it was last drawn. A layer that moves
hundreds of icons a frame through the draw port then costs a few times
a direct billboard write rather than thirty: 800 icons took 1.1 ms a
frame and now 0.18 ms in a Node benchmark, 3,000 took 4.4 ms and now
0.5 ms. What is drawn is unchanged; any add, removal, reorder, image
change or other restyle takes the existing path.
2026-11-08 20:22:58 -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 5b1920d65b Merge branch 'sameh/renderer-layer-wrappers-2' into sameh/renderer-seam
# Conflicts:
#	src/data/localGeojsonCore.js
#	src/render/cesiumAllowList.json
2026-11-08 19:49:29 -08:00
Sameh Khamis ef616b7905 Share the camera events and the stub's drawn positions with other cameras
The geo export now has geodesicAt and horizonFrom. The camera events module
is a public export (./render/camera/events) and holds move detection and the
command hooks as well as the per-listener changed measure; the stub camera
uses them. Each onCommand registration is now its own, so removing one twin
leaves the other. The stub's testing.drawnPosition says where it draws an
item, so a camera that is not the stub's can follow drawn items.
2026-11-08 19:22:42 -08:00
Sameh Khamis afd8dba67b Give sensor picks plain screen positions and the canvas from their caller
sensorPickPosition returns {x, y} rather than a Cesium Cartesian2 and is
handed the canvas it sizes by, so it no longer reaches Cesium or the
viewer and leaves the Cesium allow-list. The style records stay keyed by
the scene object.
2026-11-08 14:49:27 -08:00
Sameh Khamis 75ad7baf13 Read the cockpit clouds' camera point from the camera port's pose
The cloud layer takes latitude, longitude and height from pose() and its
angle conversion from geo/vector, so it no longer reaches Cesium and
leaves the Cesium allow-list.
2026-11-08 14:49:24 -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 d513034f3d Draw the satellites layer through the renderer ports
The satellite dots, the tracked satellite's dot and the orbit rings now go
through the draw port instead of a raw point collection, an entity and
primitives, so the layer's rendering no longer drives Cesium and leaves the
Cesium allow-list.

- Dots are one points set, patched in place and sent once per frame.
- The tracked dot is its own set, drawn at the sample the follow camera
  framed (or after the frame's own sample when no camera read it).
- Rings are geodesic lines with a behind-the-globe colour, turned about the
  pole by the sidereal angle in the layer each second, since the port has no
  inertial frame. The orbit frame matrix is a plain 16-number array, and
  the launches layer now receives plain ECEF orbit positions.
- Clicks match the draw hit against the layer's own sets.
- The focus pass projects every dot in one batched call.
- Depth-fail lines in the Cesium draw port honour pickable: false.
2026-11-08 13:06:52 -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 1bff078097 Draw the installations layer through the renderer ports
The site dots, outlines and selected footprint fill are now draw-port sets
(points, draped lines, clamped shapes) instead of Cesium entities. The
selected site's dot is drawn by a set of its own, so selecting a site
redraws no other dot. Selection is registered through plain carrier
objects in the context store, as the local GeoJSON layer does, and the
tracked card reads the site's label and position from the carrier's entity
record.

A double-click on a site dot now follows it through camera.follow (gated on
the stock double-click follow), centred on the surface under the dot when
its height is loaded; one on an outline or fill zooms to it. Hiding the
layer stops a follow it started. The layer no longer lowers the shared
camera change sensitivity: its own camera-port listener carries its
threshold.

The follow offset fitting moves to src/geo/frames.js and is shared with
the local GeoJSON layer. rendering.js leaves the Cesium allow-list
(33 -> 32); the layer's entry joins DRAW_FROM_CALLER.
2026-11-08 12:13:29 -08:00
Sameh Khamis 481df0b093 Merge branch 'sameh/renderer-leftovers' into sameh/renderer-seam
# Conflicts:
#	src/render/cesium/draw.test.mjs
#	src/render/cesiumAllowList.json
2026-11-08 12:00:30 -08:00
Sameh Khamis dabdab47d6 Draw S2 GhostMaps through the renderer draw port, off Cesium
Each product edition now draws as three renderer sets (pins, lines and
fills) instead of a Cesium data source. Pins keep the depth test off and
the Street Level horizon cull, clicks resolve through the draw hit of the
current edition, and a new edition is drawn before the old one goes. A
viewer with no renderer bound draws nothing and releases the edition's
packed images. The layer leaves the Cesium list; a caller handing it a
viewer of their own loads ./render/cesium/unbound first. The QA script
reads pins from the scene instead of data sources.
2026-11-08 11:54:43 -08:00
Sameh Khamis 4a9b1389ba Draw rocket launches through the renderer ports, off Cesium
The launches layer's sites, markers, reticles, mission lines, live orbit
rings and pad zone are now renderer draw sets. Picks go through the query
port, double-click follow through the camera port (shared with other layers
in src/data/stockFollow.js), and per-frame work through the frame port.
rendering.js, orbitRendering.js and launchPad.js leave the Cesium list.

The Cesium draw port gains what these need: pattern line styles, lines in
the inertial frame turned each frame by the set's motion clock, radial-rim
fills on clamped ellipses with a depth bias, and parking for hidden lines
that cannot settle into a static batch, so a hidden line no longer costs a
draw each frame. A roster writes each set once, and a followed live payload
shares one position sample with its marker each frame.
2026-11-08 11:26:21 -08:00
Sameh Khamis a59f9b10b2 Draw Radio stations and their clusters through the draw port and take the Radio renderer off the Cesium list
The stations, the cluster dots and the selected station's dot and bracket
are draw-port point and icon sets. Stations drawn too close together on
screen are grouped by geo/screenCluster.js as the default renderer's
entity clustering grouped them: the same boxes and screen coordinates, the
same reuse of the last pass's clusters when the eye comes lower, a pass
whenever the camera moves enough or a station is shown or hidden, and
stations a pass passes over hidden until the next. A cluster dot names its
seed station, so a click plays it as before. The Radio QA script reads the
drawn sets; the unused cluster-collection internals helper is gone.
2026-11-08 11:11:50 -08:00
Sameh Khamis b2502d6f37 Draw FIRMS fire glows through the draw port and take the FIRMS renderer off the Cesium list
The fire glows are one draw-port icon set with horizon cull, drawn on the
renderer's moving-icon path with a hold motion, as the layer's own icon
primitive drew them. Only glows that are new or changed are written, after
the set accepts them; fires a refresh drops are removed. Clicks read the
renderer's hit and match the layer's own set id. The sprite order registers
the set by its id.
2026-11-08 10:29:40 -08:00
Sameh Khamis 3fa1ad0283 Merge branch 'sameh/renderer-cctv' into sameh/renderer-seam 2026-11-08 09:45:47 -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 1d08043bf9 Draw CCTV camera icons through the renderer ports and take rendering.js off the Cesium list
The camera icons are now a draw-port icon set kept by an icon book; only
icons a view pass or restyle changes are written, in one write per pass.
Picks read the renderer's hit, the view pass and focus pass project
through the camera pose (geo/frustum.js poseProjector, matching the
renderer's projection and near clip) and the query port, and tile
readiness for ground sampling comes from the globe port.
2026-11-08 09:38:24 -08:00
Sameh Khamis 2a607ec4d8 Draw CCTV coverage, viewsheds and the monitor plane through the renderer ports and take projection.js off the Cesium list
The frustum wireframes, viewshed volumes and the active camera's monitor
plane are now line, mesh and quad items of the layer's own draw sets
(layers/cctv/drawSets.js), written from plain handles only as they change.
The plane takes its canvas double buffer or its video as a quad source.
Picks of lines and planes are matched by set, item id and the record that
draws them. The activation obstruction probe casts through the query
port's rayCast; its clamp lands a microtask later, rewrites the geometry
and asks again for the footprint ground, and a newer activation, a range
edit, a deactivation or a re-init drops an answer still to come.
2026-11-08 08:35:12 -08:00
Sameh Khamis bbad02b73e Draw the CCTV calibration gizmo through the renderer ports and take it off the Cesium list
The gizmo's rings and move arrows are draw-port lines that dim where
geometry hides them, and its handles and arrow tips are depth-test-free
draw-port points; their item ids keep the cctv-gizmo-<part> scheme the
layer's pick owner matches. Picks, rays and the cursor go through the query
port and the renderer's canvas, and the drag math runs on plain vectors.
The layer reports what the gizmo draws for the QA harness, which reads the
parts there instead of from the viewer's entities.
2026-11-08 07:55:30 -08:00
Sameh Khamis 393f1686f2 Draw quads and meshes through the Cesium draw port
The Cesium draw port now makes quads sets (a posed, textured plane with its
outline, drawn as a plane entity with a transparent image material draws it)
and meshes sets (triangles in the east-north-up frame at an origin, flat and
two-sided or lit and closed). Quads change in place as they move, resize,
fade or take a new canvas; a video quad keeps frames coming while it plays
and gets a new material when its size or source kind changes. Mesh vertices
are placed in the Earth-fixed frame, so Cesium can project them for its 2D
views. The capabilities list both kinds.
2026-11-08 07:23:54 -08:00
Sameh Khamis fa762f808e Paint detection from the overlay host's camera, off Cesium
The world overlay host now hands each paint lane the eye's height from
the camera port's pose (cameraHeight) beside its position. Detection reads
its view scale and label budget from it instead of the viewer's Cesium
camera, measures box distances with plain arithmetic, and no longer keeps
the viewer, so detection.js leaves the Cesium allow-list.
2026-11-08 06:06:06 -08:00
Sameh Khamis d0ca460313 Publish the tracked satellite's focus through the renderer ports
The satellites layer publishes its focus rectangle with
publishFocusTargetAt, projecting its cached position through the query
port and measuring from the camera port's pose, as flights and military
already do. The scene-taking publishFocusTargetFromCachedPosition and the
unused advanceProjectedSpriteFocus go, and focusDeemphasis.js leaves the
Cesium allow-list. The rectangle is the same; the target's frameNumber,
which nothing reads, is now -1 as the other layers publish it.
2026-11-08 05:56:09 -08:00
Sameh Khamis b6e94b8d93 Move the scene-reading icon orientation helpers into the Cesium adapter
screenProjectedRotation, perspectiveProjectedRotation, horizonOccluder and
cameraPoseSignature read a Cesium scene or camera, so they move unchanged
to src/render/cesium/iconOrientation.js, where the CCTV, radio and transit
rendering (still Cesium-bound) load them. src/data/iconOrientation.js keeps
the label backdrop test and the rotation deadband, and leaves the Cesium
allow-list. Local ADS-B computes its rotation from the camera port's axes
with courseScreenRotation directly, the same answer without a stand-in
scene.

The ./aircraft package entry re-exports src/data/iconOrientation.js, so it
no longer carries the four moved helpers or the PERSPECTIVE_* constants.
2026-11-08 05:49:05 -08:00
Sameh Khamis d8d6db4389 Keep icon sets and their motion segments off the renderer
iconSet.js and iconSegment.js no longer import Cesium and leave the
allow-list. A segment's base is split into high and low floats, and an
arc's east and north axes are computed, the way the default renderer
did it, so the GPU reads the same bits (tests compare every stored float
against Cesium, poles and the centre included). The set's epoch is a
geo/julian date; colours, distance curves and cull points come back as
plain objects. Renderer dates and colours passed in still work.
2026-11-08 05:33:20 -08:00
Sameh Khamis 09f2b88bf9 Move the instanced icon set primitive into the Cesium adapter
The primitive that draws icon sets in a Cesium scene now lives at
src/render/cesium/iconSetPrimitive.js beside the draw port's GPU icons,
and leaves the Cesium allow-list. Its importers (the draw port, CCTV,
FIRMS and the cyber sonar overlay) load it from there.
2026-11-08 05:19:53 -08:00