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.
This commit is contained in:
Sameh Khamis committed 2026-11-07 00:09:10 -08:00
1 parent 10db177251
commit a8cf63999b
8 files changed
+204 -75

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
import { observeTrafficSurface } from './surface.js';
import * as Cesium from 'cesium';
// Still Cesium for its points and events, so this layer loads the unbound
// camera factory (with its query port) its other parts reach the renderer
// through.
import '../../render/cesium/camera.js';
import { TRAFFIC_TIMING_ENABLED } from './policy.js';
import {
claimCameraSensitivity,