Commit Graph
3971 Commits
Author SHA1 Message Date
Sameh Khamis f0e5540561 Own the GPU icon modules in the ghost maps package
Ghost maps now loads the camera factory, which reaches the draw port and
its GPU icon set modules; list them as the package's own.
2026-11-07 01:50:42 -08:00
NeoXrated23 9b65d41bab docs: add changelog entry for Giroc camera contribution 2026-11-07 11:48:07 +02:00
NeoXrated23 891eb56091 feat(cctv): add optional Giroc camera and support larger HLS segments 2026-11-07 11:46:48 +02:00
Sameh Khamis 7e07927660 Draw Street Level's coverage lines through the renderer's draw port
The coverage lines are draped line sets on the draw port now, not
ground polyline primitives of the layer's own. A tile draws in sets of
120 line parts, as its primitives were batched; each part is an item of
its own (its id made unique in the tile) that picks its sequence
(`meta.pick`). A filter change redraws the sets in place, so the old
lines show until the new ones are ready. The selected sequence is one
set over the coverage, redrawn in place as tiles land; the tiles hide
their own lines of it, a show change made in place, so it shows
whichever set is drawn over which. The wait for the terrain-height
table goes: the renderer builds draped lines when it is ready. A colour
the layer cannot read is handed to the renderer as given.

Clicks no longer read the renderer's pick. The click dispatcher's event
gains `windowHit(width, height)`, the wider pick read as the canonical
id, the draw-set hit and whether it is the map itself. Street Level
routes its own sets' hits by their pick, anything else (a provider's own
drawing) by its id, as before; the ground under a click comes from the
event, and the ground click is told whether the map was hit. The screen
centre is aimed through the query port, a pick that fails counting as a
miss. Street Level no longer reads the scenePick service.

The Cesium draw port no longer lets a show queued while a draped line
built override one applied once it was ready, before the swap: the
highlight hand-over now depends on that.

lineCoverage leaves the Cesium allow-list; with it every Street Level
file named in this work is off the list.

Differences the contract does not let us avoid:
- The lines draw among the scene's primitives, not its ground
  primitives: they now draw over other layers' clamped entities and
  ground primitives, and win picks against them.
- The highlight builds asynchronously: a newly selected line is not
  drawn for the frames that takes.
- Lines of other sequences in tiles that land after the highlight was
  first drawn cross over it.
2026-11-07 01:40:32 -08:00
Sameh Khamis 40ad27fb95 Draw Street Level's marker and cones through the renderer's draw port
The photo marker and every provider's image cones are icon sets on the
draw port now, not billboard collections of their own. Each keeps its
pick id as the item id, so clicks route as before; each set is drawn
(empty) as soon as it is made, so the cones stay drawn over the marker
whichever is first given something to show. The horizon cull still runs
in the layer, against the ellipsoid lowered 1,000 m, and sends only the
items whose show changed; a quiet first cull of items about to be drawn
replaces the flags that held its callback back.

marker and sequenceCones leave the Cesium allow-list. The Panoramax line
click reads the camera height from the camera port.

A difference the contract does not let us avoid: the icons turn to their
bearing about local north (the contract's `course`), where the
billboards used the Earth's axis. Looking straight down nothing changes;
in a tilted view a cone now points along its true bearing on the ground
instead of leaning toward the pole.
2026-11-07 01:40:32 -08:00
Sameh Khamis a10f3a16e1 Read Street Level's camera and ground through the renderer's ports
The Street Level view maths no longer reads Cesium. The camera's place
comes from the camera port's pose; the visible box and the view focus
cast the query port's screen rays and meet them with the ground, the
WGS84 ellipsoid raised to the ground height, in geo; heights come from
the query port; the horizon cull for the marker and the cones tests
against an ellipsoid 1,000 m below WGS84 in geo and re-culls on the
frame port's pre-render. Ground clicks, the screen-centre aim, the
nearest-image point, photo framing, the coverage refresh and the ground
re-measure read the same ports and convert positions with geo.

geo's ellipsoid functions (toLonLatH, rayEllipsoid and those under them)
and horizonFrom take an optional ellipsoid, made with ellipsoidOf or
offsetEllipsoid; anything else, a map index included, means WGS84. Tests
check them against Cesium on raised and lowered ellipsoids.

view, index, cameraFraming, groundClick and selection leave the Cesium
allow-list. The Street Level entries are Cesium-free callers of the
unbound factories: given a viewer of a caller's own, with no renderer
bound, the caller loads ./render/cesium/unbound first. GhostMaps, which
uses the horizon cull and is still on the list, loads the camera factory
itself.

Differences the contract does not let us avoid:
- The ground under the camera no longer reads whether the globe is shown
  (the globe port has no visibility getter). Where 3D tiles answer under
  the camera they decide, as they did under Google 3D; elsewhere the
  terrain answers, then the drawn surface below the camera. Over 3D tiles
  shown on a map with the globe (and under other primitives at the
  nadir) those now count as ground.
- Without depth-texture support the query port answers no heights, the
  terrain included, so the ground then reads as the ellipsoid.
- selection and groundClick still read the click dispatcher's own pick
  for now; they move to draw-set hits with the coverage lines.
2026-11-07 01:40:32 -08:00
Sameh Khamis 30b6be1da0 Drive the camera orbit and the FPS readout through the frame port
The orbit controller and the frame-rate monitor had left the Cesium
allow-list but still hooked the scene's preRender and postRender events.
They now listen through the frame port; the monitor looks the port up
each time it is shown, so a renderer bound after it was created is the
one it counts.
2026-11-07 01:04:47 -08:00
Sameh Khamis d0aa8d8f7d Run the weather layer's frame readiness and render requests through the frame port
The weather globe rendering had left the Cesium allow-list but still
listened to the scene's postRender event to admit, install and retire
frames, and asked the scene for renders directly. It now uses the frame
port, looked up the same injectable way as its globe, camera and credits
ports.
2026-11-07 01:04:47 -08:00
Sameh Khamis 6386034add Run the submarine cables layer's sweep and render requests through the frame port
The cables lifecycle and ingestion parts had left the Cesium allow-list
but still hooked the scene's preRender event and asked the scene for
renders directly. They now use the frame port.
2026-11-07 01:04:46 -08:00
Sameh Khamis 6fc3c78e70 Read the awareness layer's camera and frame through ports
The awareness lifecycle and focus parts had left the Cesium allow-list
but still hooked the scene's preRender event and read the Cesium
camera's position and orientation. They now use the frame port and the
camera port's pose, with the same quantized motion signature.
2026-11-07 01:04:46 -08:00
Sameh Khamis 045267c841 Keep the radio layer's Cesium entities and picks in its rendering part
The radio interaction, selection and navigation parts had left the
Cesium allow-list but still read pick objects, toggled entity
visibility, removed the selection entity, re-ran clustering and read the
Cesium camera. Navigation now reads the camera port's pose; the rest
moves into the rendering part.
2026-11-07 01:04:46 -08:00
Sameh Khamis a8f41d30fc Keep the camera layer's Cesium picks, entities and projection in its rendering part
The camera layer's lifecycle, cards, geometry, hover and selection parts
had left the Cesium allow-list but still drove the scene: Cesium camera
move events, scene picks and pick objects, entity removal, the
activation ray probe and the cards' canvas projection. The move events
now come from the camera port and card render requests go through the
frame port; the rest moves into the rendering part, which stays listed.
The move listeners are attached and released in one place, with a test.
2026-11-07 01:04:46 -08:00
Sameh Khamis f6c5e6ba10 Drive the launches layer's frame, camera and entities through ports and its rendering part
The replay chase camera and the mission frame pass listen on the frame
port, the hover on the camera port's move events. Showing the missions,
clearing their entities and reading mission picks move into the launches
rendering part, which stays on the Cesium allow-list, so the layer's
other files no longer drive Cesium. A replay with no frame loop to move
its camera on does not start.
2026-11-07 01:04:46 -08:00
Sameh Khamis 9857ff1024 Own the GPU icon modules in the traffic package
The traffic package reaches the Cesium draw port, which now loads the
GPU icon set modules; list them as the package's own.
2026-11-07 00:45:08 -08:00
Sameh Khamis f6422d2247 Draw the vessels layer's ships through the renderer's ports
The ships are one icon set from the draw port, held on course with hold
motion segments and drawn over depth as before; the layer keeps what it last
drew in an icon book and reads focus and pick ownership back from there,
matching clicks on the draw hit's set and id. Its frame hook, camera pose,
horizon test and screen projection come from the frame, camera and query
ports, with the horizon lift in geo/horizon judging the same point the GPU
cull does. The icons' draw set is disposed when the layer is destroyed.

rendering.js no longer imports Cesium or touches the scene's primitives,
picks, render events or camera, and leaves the Cesium allow-list. It still
reads the canvas size for the label budget. Callers of the vessels entry
load the Cesium adapter's unbound fallbacks.
2026-11-07 00:38:20 -08:00
Sameh Khamis bb85e0fa74 Draw moving icon sets on the GPU through the Cesium draw port
An icon set whose items move along motion segments, glide their course,
recede toward the limb, pick through a larger proxy or switch images by
drawn size, or that takes columns, now draws as one instanced
IconSetPrimitive in place of its billboards. The set switches the first time
an item needs it (or columns arrive) and stays switched; a course blend
alone switches it only when everything it holds can go. The Cesium ports
advertise columns, motionSegments and courseGlide.

GPU sets refuse loudly what billboards draw and they do not: clamped
heights, fadeByDistance, displayRange, offsets, anchors other than the
centre, axis and screen rotations, opaque and additive blends, images other
than URLs and SVG, and more images than the shared atlas has room for. A
refused write changes nothing.

The shared icon columns gain an image switch size, a pick proxy and a
per-row depth-test distance (defaulting to always over depth, as before),
arcs gain a climb rate, and the epoch rebases in both directions. Rows keep
asking for frames while they move, turn or blend; a write that moves a row
as it already moves (a restyle, a focus change) leaves its segment alone.
Billboard icons now fade with focus as GPU ones do.

Conformance gains columns and motion checks for the Cesium adapter.
2026-11-07 00:38:20 -08:00
Sameh Khamis f0427fc63e Wait for drawn street traffic frames through the frame port
Road surface refinement and the development timing marks now listen for
drawn frames on the renderer's frame port instead of the scene's own
postRender event. Refinement reads the drawn frame's surface readiness
directly, since frame-port listeners run before the rendered-frame
observer. The view-height estimate's globe and sample-height reads move
into the surface module, which stays on the Cesium allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis 0933ff49ff Ease street traffic heights through the query and camera ports
Height easing projects waypoints through the query port and keeps them
beyond the camera's near plane from its pose, instead of the Cesium view
matrix and scene transforms. Point maths uses new allocation-free geo
helpers (distanceSquared, copyInto, lerpInto), which road selection now
shares. Retention leaves the Cesium allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis ecaa965b69 Select street traffic roads through the query and camera ports
Road selection reads the depth probe and each waypoint's window position
through the query port and the eye through the camera port, and keeps its
point maths in plain geo helpers. Flow leaves the Cesium allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis a8cf63999b Read the street traffic viewport through the camera and query ports
The traffic layer's camera altitude, view bounds and fetch centre come from
the renderer's camera port (its pose and view rectangle), and the reticle
footprint samples the ground with the query port's ellipsoid picks and
rays instead of the camera's own. The footprint's nadir is the pose
position in geodetic radians, as the camera's own cartographic position
was. A pixel the renderer has no ray for (a canvas of no size) samples no
direction, as the unset scratch ray did. The lifecycle part loads the
default renderer's camera factory, so a viewer of a caller's own gets
both ports.

Footprint and viewport leave the allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis 10db177251 Compute street traffic roads, colours and state without Cesium
Road waypoints are plain ECEF points from the geo helpers (the same
formulas as before, so every waypoint and segment length is unchanged), and
the palette is renderer colours. The style part, still on the point
primitives, turns those into the points' colours once per colour and owns
the dot painting the model used to do itself; the rendering part converts
them for the heat lines. The animation keeps its own lerp scratch, and the
ingestion's centre height asks with plain degrees.

Ingestion, model, policy, state and timing leave the allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis d6f09f9860 Project the launches replay overlay through the query port
The replay vehicle overlay asks the renderer's query port where the vehicle
and its path tangent land on screen, instead of Cesium's scene transforms,
and the anchor horizon test uses the geo vector helpers and the WGS84 radii.
A point behind the eye, or a scene with no query port, hides the overlay as
an unprojectable point did before.

Overlays leaves the allow-list.
2026-11-07 00:09:10 -08:00
Sameh Khamis 2443028d0f Take the camera viewshed colours and volume builder off Cesium
The viewshed palette is renderer colours from a new hslColor in
render/color, which computes as the renderer's own fromHsl does (the CSS
HSL reading now goes through it). The volume primitive builder moves,
unchanged, into the camera layer's rendering part, which converts each
record's palette to Cesium colours once and draws the lines and volumes
with them as before. Tests check the palette against the renderer's
colours exactly.

cctvViewshed leaves the allow-list.
2026-11-06 23:47:17 -08:00
Sameh Khamis 0f496b9ae8 Take the camera layer's geometry off Cesium
The frustum's view axis comes from geo/frames' east-north-up frame, and
the activation probe's mount point and hit distance from geo/ellipsoid and
geo/vector; a new test checks the axis and the monitor plane's orientation
against the renderer's own transforms, bit for bit. The mesh-floor
sampling reads the eye through the model's camera-port helper.

What the geometry part did with Cesium moves, unchanged, into the
rendering part, which owns the layer's Cesium drawing: the positions the
entities take, building the five coverage lines, building and removing
the viewshed volumes, the photoreal tileset readiness check, and the
probe's one ray pick, which now goes through a small rendering helper.

Geometry leaves the allow-list.
2026-11-06 23:47:17 -08:00
Sameh Khamis d71d25961f Read the camera layer's eye through the camera port
Cards, the geometry queue, the nearest-camera search, auto-hop's view
context and the view motion pass read where the eye is from the camera
port's pose, through one model helper that answers null when there is no
camera or the eye has no geographic position, as the code did for a
missing cartographic position. The motion pass measures with geo/vector,
and a camera's first position comes from geo/ellipsoid as a plain point;
everything that reads it takes x, y and z. Navigation flies through the
port it already used, now found through rendererOf; the rendering part
loads the camera factory so a viewer of a caller's own still has one.

Cards, geometryQueue, navigation and lifecycle leave the allow-list.
2026-11-06 23:47:17 -08:00
Sameh Khamis 7d760d32fc Take the camera layer's policy, state, model and ground off Cesium
The layer's colours are renderer colours; the parts that still draw with
Cesium (icons, coverage lines, the monitor plane) turn them into Cesium
colours with the adapter's own conversion. The screen and matrix scratches
are plain objects, which is all the projections that fill them write.

The model part converts angles with geo/vector, reads where the eye is
from the camera port's pose, and builds the monitor plane's orientation
with geo/quaternion from the same axes; the projection part hands the
entity a Cesium quaternion of it. The photoreal tileset readiness check,
which looks through the scene's primitives, moves to the geometry part.
The ground pass moves a camera icon by writing geo/ellipsoid's position
into the record's own position object. The test plane's plain material
comes from the projection part, and the selection part only lost an
unused import.

All give the same numbers as the Cesium calls they replace. Policy,
state, selection, testing, model and ground leave the allow-list.
2026-11-06 23:47:08 -08:00
Sameh Khamis 2592289612 Draw the ALPR layer's markers through the renderer's ports
The ALPR badges were Cesium entities whose billboards the layer changed in
place: the canvas overlay swapped a badge to a faint pick target at its
anchor, selection swapped the image, and unresolved floors clamped to the
ground. They are now one icon set from the draw port, updated in place
through upsert, so selection and the overlay swap change the same
billboard without a rebuild or a blink. Badges keep their scale by
distance, ground clamping and depth-test settings.

Marker state lives in the app (markerState.js): a plain carrier per camera,
registered as the camera's context entity, and a marker set that batches
changes and sends only the icons that draw differently. Clicks on native
badges come from the dispatcher's draw hit. Projection, the on-screen
count, height samples (excluding the layer's own set), the screen-centre
ellipsoid pick and the camera reach the renderer through the query,
camera and frame ports. A resync of the overlay now hands back only the
cameras that leave it, so kept ones are not written twice.

index.js, overlay.js and presentation.js leave the Cesium allow-list; the
layer's entry is Cesium-free, and a caller's own viewer loads the
unbound factories.

Differences the contract does not let us avoid:
- Double-clicking a badge no longer starts the viewer's entity follow,
  since draw items are not entities.
- The terrain fallback for anchors is no longer skipped while the globe
  is hidden: the globe port has no visibility getter.
- Without depth support the query port answers no heights, terrain
  included, so anchors wait for a cached floor there.
- On a viewer with no renderer bound, the surface counts as settled
  when anchors are refined.
2026-11-06 23:28:43 -08:00
Sameh Khamis faded8a418 Draw the installations layer's named markers through the renderer's ports
The named-site dots are a draw-port point set with horizon culling instead
of a raw point collection; their on-screen count tests the ellipsoid
horizon and projects through the query port, and they follow the camera
port's changed and moveEnd events and the frame port's preRender. Points
that only change look (a selection) are restyled in place. Clicks on a dot
read the draw hit; the item id is not the bare record id, so sibling
layers' pick-owner checks still treat a dot click as nobody's.

Code that only asks whether a click hit anything (the CCTV layer) now sees
a dot click as a hit, as it already did for the site markers: a draw item's
pick always resolves to its id.

The named markers leave the Cesium allow-list. The site markers in
rendering.js stay entities.
2026-11-06 23:28:43 -08:00
Sameh Khamis e327760074 Build the selected vessel's trail without Cesium
Trail vertices are geo/ellipsoid positions and the minimum move is measured
with geo/vector, both giving what the Cesium calls gave. Re-anchoring rows
when the geoid loads asks the rendering part for the anchor, now one
function prepareRecordVisual shares, so icon positions stay Cesium values.
The shared trail renderer takes plain ECEF positions as well, turning them
into Cartesian3s for its polyline; the Cartesian3s other layers hand it
pass through untouched. tracking leaves the Cesium allow-list.
2026-11-06 23:02:09 -08:00
Sameh Khamis 1c840cb66f Read the vessel view area and evidence through the camera and query ports
The area the vessel feed asks for comes from the camera port's pose and
the query port's ellipsoid pick at the middle of the screen, converted
with geo/ellipsoid, rather than from the Cesium camera; the development
evidence snapshot projects through the query port. Both answer as the
Cesium calls did. The rendering module, still on the Cesium allow-list,
loads the camera factory so a viewer of a caller's own still has both
ports. cameraArea and evidence leave the Cesium allow-list.
2026-11-06 23:02:09 -08:00
Sameh Khamis 0a81c2e197 Take the vessel layer's state and queries off Cesium
The focus pass's screen scratch is a plain { x, y } (Cesium only writes x
and y into it), and getNearby measures distance with geo/vector, which
gives the same result for Cartesian3s. Both files leave the Cesium
allow-list.
2026-11-06 23:02:09 -08:00
Sameh Khamis db2c579265 Take the launches lifecycle off Cesium
The layer's entity data source is now created and removed by the
rendering part, which owns the entities and stays on Cesium: the replay
vehicle and the live payload move every frame, the selected site is the
viewer's selected entity, and the orbits draw with their own materials.
The hover keeps its pending pointer position as a plain point.

Lifecycle leaves the allow-list.
2026-11-06 22:57:55 -08:00
Sameh Khamis e2dea507b9 Move the launches replay and selection cameras onto the camera port
Replay and selection no longer import Cesium. Their maths uses the geo
helpers; the full-globe framing reads the camera's position and field of
view from the port's pose. Choosing the selected entity, showing only the
selected mission's entities and reading the projected orbit for framing
move into the rendering part, which owns the entities, so selection no
longer touches them. The full-globe framing now checks the canvas size
before it asks for the camera.

The replay camera still steps in the scene's preUpdate, as before; it moves
onto the frame port once unbound viewers have one.

Replay and selection leave the allow-list.
2026-11-06 22:57:55 -08:00
Sameh Khamis a2503476de Compute launch paths, cameras and colours without Cesium
The launches layer's path building, replay camera maths, policy constants,
state, marker colours and mission panel no longer import Cesium. Paths and
camera poses are plain ECEF points computed by the geo helpers with the
default renderer's own formulas in the same order, so trajectories, orbits
and camera framing land where they did. Geodesic interpolation moves from
the stub renderer into geo/geodesic (geodesicLine, solved once per
geodesic), and geo/sphere gains the renderer's sphere union.

Marker colours are renderer colours, with the panel's CSS from the same
palette. The rendering part, still Cesium for its entities, converts the
plain points where the entities take them, culls with the shared horizon
test, loads the unbound camera factory, and hands the panel the live
payload position directly instead of through the entity.

Camera, model, panel, paths, policy, policyHelpers and state leave the
allow-list.
2026-11-06 22:57:55 -08:00
Sameh Khamis 0782b073e2 Own the query and frame modules in the transit package
Transit's viewport loads the Cesium camera factory, which now loads the
unbound query and frame factories too.
2026-11-06 22:30:27 -08:00
Sameh Khamis 4ed51930c2 Give a viewer of its own a frame port, and use it for the active fires layer
findFrame and frameOf find the bound renderer's frame port or, for a
caller's viewer with no renderer bound, one the Cesium adapter's factory
builds over it, as findQuery and findDraw do. Unlike the renderer's own,
it leaves the viewer's loop as its owner set it up: it listens to the
scene's phases, asks for frames, holds by asking again after each one
drawn, and maps suspend, the target rate and scene time onto the viewer.
Its preUpdate says whether the tick draws by the same test the renderer's
frame port makes, now shared by both.

The active fires layer's cards and LOD watcher take their query and frame
ports from findQuery and findFrame, in place of the layer's own copy of
projection, occlusion and preRender over the viewer's scene.
2026-11-06 22:25:07 -08:00
Sameh Khamis 784561a6ae Give a viewer of its own a query port, as it has draw and camera ports
The Cesium query port moves out of createCesiumPorts into its own module,
unchanged, so it can also be built over a caller's viewer with no
renderer bound. findQuery and queryOf find the bound renderer's query port
or, for such a viewer, one the Cesium adapter's factory builds, as findDraw
and findCamera do. It picks the sets drawn through findDraw on that viewer
and its height samples see through them, so a layer can exclude its own
sets; it projects, casts rays and picks the ellipsoid as the renderer's
does. A renderer bound later answers new callers.

The camera factory and the caller's unbound export load it, and the
factory walk checks that every public entry reaching a findQuery or queryOf
caller loads it, or is a Cesium-free entry whose caller does.
2026-11-06 22:25:07 -08:00
Sameh Khamis ee6b9e49aa Scale, fade and show icons by eye distance
Cesium icon sets now draw an item's scaleByDistance, fadeByDistance and
displayRange, as point sets already draw their curves, and drop them again
when a restyle in place leaves them out. An empty display range shows the
icon nowhere; a curve whose far end is not past its near one is left out
rather than refused mid-update. Cesium eases between a curve's ends rather
than interpolating linearly, as it always has for points.

The reference renderer now scales an item's pick size by its distance curve
and leaves out items faded or scaled to nothing, and the draw.icons.distance
conformance check covers all three fields.
2026-11-06 22:25:07 -08:00
Sameh Khamis 1aa280b43f Change icon set billboards in place instead of rebuilding the collection
An icon set's upsert, set, remove and an atlas registered again now restyle,
move, re-image, add and remove billboards in the collection the set already
has, so markers no longer blink as every image reloads on each change. A
changed image swaps on its own billboard; the old one keeps drawing until
the new one has loaded.

The set is still built anew where changing it in place would not draw the
same: when new icons would land ahead of drawn ones, when a set reorders
its items, when a key's generated image comes as a new canvas, when the
set is emptied, and when its collection would hold many more images than
it draws (a collection keeps every image it has loaded).

Adds the draw.icons.update conformance check.
2026-11-06 22:25:07 -08:00
Sameh Khamis c0a5d4141d Merge pull request #1616 from bilawalsidhu/fix/chat-tool-schema-patterns
fix(chat): send OpenAI chat tool schemas Chat Completions accepts
2026-11-06 22:21:05 -08:00
Sameh Khamis 3d320035b6 Wait for the holds check's flight by the clock, not a frame count
A page's frames come at the display's rate: at 240 Hz the 20 frames the
check allowed pass inside the 100 ms flight, and it failed on 'the flight
ended'. It now waits up to a second by the harness clock, still capped at
600 frames, as the moveEnd check does.
2026-11-06 22:16:32 -08:00
Sameh Khamis 1d2b853576 Move the installations layer's camera, geometry and colours onto renderer ports
The layer's view rectangle, wide-view pose, flights and camera events now
go through the camera port, and its distance and position maths through
the geo helpers: getNearby confirms candidates with the ported
ellipsoidal geodesic, as before, and returns plain ECEF positions. Class
colours are renderer colours; the entities convert them. The layer's
camera `changed` listener has its own 0.01 threshold on the port, the
sensitivity it already claimed while on; the claim stays for other raw
camera listeners.

Controls, lifecycle, model, state and viewport no longer import Cesium
and leave the allow-list. Rendering and the named markers stay on
Cesium: the site markers are entities because the camera follows them
on double-click and the tracked card reads its title and position from
them, and the entity data source moves from lifecycle into rendering.
Rendering loads the unbound camera factory for the parts that reach the
port.

The test camera bound over a Cesium-shaped fake now answers its view
rectangle from the fake's computeViewRectangle when it has one.
2026-11-06 22:10:53 -08:00
Sameh Khamis e74c7c1f44 Draw submarine cables through the renderer's draw and camera ports
Cable lines, landing pins, polygon fills, reference stems and reference
points are now five draw sets per layer (submarine-cables:N:lines and so
on) instead of GeoJSON data sources and entities. Clicks resolve through
the draw hit; flights and the sweep's eye go through the camera port.
The layer keeps the styling the GeoJSON loader gave it: cable colours,
widths and alphas, simplestyle stroke, fill and marker properties, fills
that keep the source's alpha, raised polygons at their heights, the
default pin image, and features without a reference drawn but neither
picked nor culled. Lines are densified along rhumb lines at the
renderer's own granularity, so the draped geodesic arcs land on the same
vertices the rhumb-line polylines did.

Supporting pieces:
- geo/rhumb, geo/horizon and geo/geodesic port the default renderer's
  rhumb line, ellipsoidal occluder and Vincenty inverse; the stub
  renderer now uses the shared horizon test and Vincenty inverse
  instead of its own copies. render/color gains cssColor, which reads
  CSS colours as the renderer does (hex, rgb, hsl; not named colours).
- The Cesium draw port changes a line in place when only whether it
  shows changes (draped, on its ground primitive, waiting for it to be
  ready rather than restarting its build) or where an undraped line
  runs; anything else still rebuilds. Icon sets honour their blend.

Ingestion, interaction, overlay, policy, rendering, state and surface no
longer import Cesium and leave the allow-list. Pins are culled at the
horizon each frame by the draw port instead of on the sweep, and
marker-symbol glyphs are not drawn inside pins.
2026-11-06 22:10:53 -08:00
Sameh Khamis f24b66d80d Rebuild a draw set for an option change only where the option is built in
Changing pickable, blend or clampTo through setOptions rebuilt a set of
every kind, so a models set loaded each glTF again and blinked. Now blend
rebuilds points only, pickable rebuilds only shapes and lines (whose ground
primitives build it in), and clampTo rebuilds everything but models, which
clamp nothing. The other kinds read those options at pick time.
2026-11-06 22:10:46 -08:00
daika f5d5da7023 docs(changelog): add the Iceland CCTV pack fragment 2026-11-07 12:57:48 +07:00
daika 021e887f94 feat(cctv): add Iceland (Vegagerðin / IRCA) as a keyless CCTV source pack
One JSON list from gagnaveita.vegagerdin.is (about 500 camera views at roughly
170 road stations). Frames are JPEG stills in a single directory on
www.vegagerdin.is; only links inside that directory are registered, and the
media proxy pins the same directory.

The list decides ids, coordinates and which frame path is proxied, so it is
fetched over https with redirects refused and the body read capped at 2 MiB;
every rejection path releases the response body. Camera ids come from the frame
file name, which is unique per view in the live feed, and repeated frames
collapse before the cap.

The feed's view description (`Skyring`) is the label. An explicit Icelandic
facing ("til vesturs", "í suður", "séð austur") sets a high-confidence heading
(264 of 499 views); a view that states none, or two different ones, keeps the
id-hash low-confidence pose. A bare road direction ("Miklabraut austur") is not
read as a facing.

IRCA publishes road camera images under CC BY 4.0 and asks that the licensor is
acknowledged without implying endorsement; the attribution is in the Data
attribution popover and DATA_SOURCES.md, and every camera carries the licence
string. Default cap is 250 with anchors at Reykjavík and four regional centres so
a cap keeps every region. CCTV_ICELAND_ENABLED=0 turns the pack off.

Verified against the live feed through fetchCctvImageFromUpstream: 499 of 499
frames returned a JPEG, all distinct, all under 20 minutes old.
2026-11-07 12:57:08 +07:00
Sameh Khamis 8ec92eb48c docs(changelog): OpenAI chat tool patterns (#1616) 2026-11-06 21:52:03 -08:00
Sameh Khamis 5e42a83d88 fix(chat): send OpenAI chat tool schemas Chat Completions accepts
OpenAI refused every typed chat request with 400 invalid_function_parameters:
resolve_area's area-id pattern uses Unicode property classes (\p{L}), which
Chat Completions does not accept as a regex. OpenAI chat now leaves such
patterns out of the tool schemas it sends; each action still checks its
arguments against its own contract, and realtime voice keeps the patterns.
2026-11-06 21:51:46 -08:00
Sameh Khamis af449184ca Read transit's viewport from the camera port
Feed activation and the view bounds read the camera port's pose and view
rectangle instead of the Cesium camera; the look-at centre comes from
geo/rectangle, which crosses the antimeridian as Cesium's does. The layer's
lifecycle loads the Cesium camera factory, so a viewer of a caller's own
still has a camera to read. viewport leaves the Cesium allow-list.
2026-11-06 21:23:57 -08:00
Sameh Khamis 56d56a4d6d Take transit's state, trails and selection off Cesium
The per-frame scratch position is a plain object, and trail vertices come
from geo/ellipsoid's fromDegrees, which matches Cesium's to the bit; the
billboards and trail geometry they feed copy them as before. The pick
diagnostic names the picked marker's collection from its vehicle rather
than from Cesium's private field. state, trails and selection leave the
Cesium allow-list.
2026-11-06 21:23:57 -08:00