Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

feat(cctv): color live video cameras apart from stills

Daniel Slay672191497a58
diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md
index 105fdd37f..734e722d7 100644
--- a/docs/CURRENT-STATE.md
+++ b/docs/CURRENT-STATE.md
@@ -4359,7 +4359,7 @@ silently demoting every later lookup for the session.
ground clamp now lifts the cap _center_ only so the wireframe stays a true pyramid welded to
the plane (was a flattened fan / the ~47.5 m divergence — RESOLVED), re-selecting the active
camera is a no-op (killed a click-flash), and texture swaps gate on canvas content (killed a
- periodic white flash). Coverage is now **metro-wide: 250 cameras** (`CCTV_AUSTIN_MAX_SOURCES`
+ periodic white flash). Camera icons are cyan for stills, violet for cameras with a live video feed, and amber for the active camera. Coverage is now **metro-wide: 250 cameras** (`CCTV_AUSTIN_MAX_SOURCES`
default 36 → 250, hard bound 300), filtered to `camera_status === TURNED_ON` (~815 live of
1,003 rows). City packs (2026-07-04): Caltrans (districts 4/7/11/3 — SF, LA, San Diego,
Sacramento; cap 300) and TfL London JamCams (cap 250) join Austin (cap 250) as keyless default
diff --git a/src/layers/cctv/policy.js b/src/layers/cctv/policy.js
index cf09ebe64..7ba4e1231 100644
--- a/src/layers/cctv/policy.js
+++ b/src/layers/cctv/policy.js
@@ -410,6 +410,9 @@ export const IDLE_CAMERA_COLOR =
export const ACTIVE_CAMERA_COLOR =
Cesium.Color.fromCssColorString('#ffd97a').withAlpha(0.95);
+export const LIVE_CAMERA_COLOR =
+ Cesium.Color.fromCssColorString('#b48cff').withAlpha(0.88);
+
export const IDLE_COVERAGE_COLOR =
Cesium.Color.fromCssColorString('#2fe0ff').withAlpha(0.24);
diff --git a/src/layers/cctv/rendering.js b/src/layers/cctv/rendering.js
index 6601d938b..d10368d40 100644
--- a/src/layers/cctv/rendering.js
+++ b/src/layers/cctv/rendering.js
@@ -4,6 +4,7 @@ import { isHeadingEstimated } from './headingConfidence.js';
import {
ACTIVE_CAMERA_COLOR,
IDLE_CAMERA_COLOR,
+ LIVE_CAMERA_COLOR,
ACTIVE_COVERAGE_CENTER,
IDLE_COVERAGE_CENTER_MUTED,
ACTIVE_COVERAGE_CENTER_DEPTHFAIL,
@@ -18,6 +19,15 @@ export function createRendering({
parts,
source,
}) {
+ /** Icon color: active wins, then live-capable video feeds, then idle stills. */
+ function cameraColorFor(record) {
+ if (record.camera.id === layerState._activeCameraId)
+ return ACTIVE_CAMERA_COLOR;
+ if (parts.model.isVideoFeedType(record.camera.feedType))
+ return LIVE_CAMERA_COLOR;
+ return IDLE_CAMERA_COLOR;
+ }
+
const {
focusNowMs,
getFocusTarget,
@@ -58,10 +68,7 @@ export function createRendering({
),
cameraDistanceFor: (position) =>
Cesium.Cartesian3.distance(camera.positionWC, position),
- baseColorFor: (record) =>
- record.camera.id === layerState._activeCameraId
- ? ACTIVE_CAMERA_COLOR
- : IDLE_CAMERA_COLOR,
+ baseColorFor: cameraColorFor,
});
layerState._activeFocusStyleCount = result.activeCount;
}
@@ -208,9 +215,7 @@ export function createRendering({
for (const record of layerState._records) {
const isActive = record.camera.id === activeId;
if (record.billboard) {
- record.billboard.color = isActive
- ? ACTIVE_CAMERA_COLOR
- : IDLE_CAMERA_COLOR;
+ record.billboard.color = cameraColorFor(record);
record.billboard.scale = isActive ? 1.25 : 1.0;
// disableDepthTestDistance stays POSITIVE_INFINITY for every billboard
// (set at creation) — see the field-test far-zoom submerge fix there.