Merge commit '2746ec753ce4d6ebafee881a212c3f327907c673' into codex/train-cctv-489

# Conflicts:
#	README.md
#	scripts/format-scope.json
This commit is contained in:
Bilawal Sidhu committed 2026-09-15 10:53:03 -05:00
commit 3571284782
252 files changed
+48512 -4509

No files matched your search

+4 -1
View File
@@ -98,6 +98,7 @@ export class StyleManager {
satellitesLayer,
cctvLayer,
bikeshareLayer,
transitLayer,
aisLiveVesselsLayer,
militaryAwarenessLayer,
cachedGroundFloor,
@@ -171,6 +172,7 @@ export class StyleManager {
cancelShareSelection: () => this._shareRestoration.cancelSelection(),
getDataManager: () => this._dataManager,
stopOrbit: () => this._stopOrbit(),
cancelOrientation: () => this._cameraOrientationControls?.cancel(),
showToast: (text) => this._showToast(text),
});
this._shareRestoration = new ShareRestoration({
@@ -569,6 +571,7 @@ export class StyleManager {
satellitesLayer,
cctvLayer,
bikeshareLayer,
transitLayer,
aisLiveVesselsLayer,
],
(modeLabel) => {
@@ -3282,7 +3285,7 @@ export class StyleManager {
northButton: this._northUpBtn,
},
runNavigation: (noun, navigate) =>
this._runExplicitNavigation(noun, navigate),
this._navigation.runOrientation(noun, navigate),
showToast: (message) => this._showToast(message),
});
}
+112 -3
View File
@@ -1,6 +1,16 @@
import * as Cesium from 'cesium';
import { isPickedWorldPosition } from '../data/scenePick.js';
function trackedTarget(viewer) {
const entity = viewer.trackedEntity;
// Read the visual's sample first; sampling a flight CallbackProperty twice
// can advance dead reckoning ahead of the displayed aircraft.
return (
entity?.gevDisplayPosition?.() ||
entity?.position?.getValue(viewer.clock?.currentTime)
);
}
export const OBLIQUE_PITCH = Cesium.Math.toRadians(-35);
export const STRAIGHT_DOWN_PITCH = Cesium.Math.toRadians(-89);
const OBLIQUE_THRESHOLD = Cesium.Math.toRadians(-60);
@@ -63,7 +73,9 @@ export function pickViewTarget(viewer) {
/** Describe the camera as an orbit around the current viewport center. */
export function readCameraTargetFrame(viewer) {
const camera = viewer?.camera;
const target = pickViewTarget(viewer);
const target = viewer?.trackedEntity
? trackedTarget(viewer)
: pickViewTarget(viewer);
if (!camera || !target || !isPickedWorldPosition(camera.positionWC))
return null;
@@ -98,6 +110,9 @@ export function setCameraTargetFrame(viewer, frame) {
const camera = viewer?.camera;
if (!camera || !frame?.target || !Number.isFinite(frame.range)) return false;
try {
const trackedTransform = viewer.trackedEntity
? Cesium.Matrix4.clone(camera.transform)
: null;
camera.lookAt(
frame.target,
new Cesium.HeadingPitchRange(
@@ -106,6 +121,13 @@ export function setCameraTargetFrame(viewer, frame) {
frame.range,
),
);
if (trackedTransform) {
// Preserve EntityView's reference frame (including satellite frames).
// Its next update carries this new local offset along with the target.
camera.lookAtTransform(trackedTransform);
viewer.scene?.requestRender?.();
return true;
}
const destination = Cesium.Cartesian3.clone(camera.positionWC);
const direction = Cesium.Cartesian3.clone(camera.directionWC);
const up = Cesium.Cartesian3.clone(camera.upWC);
@@ -160,6 +182,62 @@ function headingDegrees(camera) {
return Cesium.Math.toDegrees(normalizedHeading(camera?.heading));
}
/** Ease an orbit without handing off the entity that owns the follow camera. */
export function createCameraOrientationAnimator(
viewer,
{ now = () => performance.now(), duration = 650 } = {},
) {
let remove = null;
let pending = null;
const cancel = () => {
remove?.();
remove = null;
pending = null;
};
function animate(frame, destination) {
cancel();
if (!viewer.scene?.preUpdate?.addEventListener || duration <= 0)
return setCameraTargetFrame(viewer, { ...frame, ...destination });
const entity = viewer.trackedEntity;
pending = destination;
const start = now();
const headingDelta = Cesium.Math.negativePiToPi(
destination.heading - frame.heading,
);
remove = viewer.scene.preUpdate.addEventListener(() => {
if (viewer.isDestroyed?.() || viewer.trackedEntity !== entity) {
cancel();
return;
}
const progress = Cesium.Math.clamp((now() - start) / duration, 0, 1);
const eased = Cesium.EasingFunction.CUBIC_IN_OUT(progress);
const target = entity ? trackedTarget(viewer) : frame.target;
if (
!isPickedWorldPosition(target) ||
!setCameraTargetFrame(viewer, {
...frame,
target,
heading: frame.heading + headingDelta * eased,
pitch: Cesium.Math.lerp(frame.pitch, destination.pitch, eased),
})
) {
cancel();
return;
}
if (progress === 1) cancel();
});
viewer.scene.requestRender?.();
return true;
}
return {
animate,
cancel,
get destination() {
return pending;
},
};
}
/** Bind the two map-orientation actions and keep their accessible state current. */
export function bindCameraOrientationControls({
viewer,
@@ -176,6 +254,7 @@ export function bindCameraOrientationControls({
// of the screen: 4 ms median and up to 12 ms, measured on this machine. It is
// therefore held between refreshes rather than recomputed per frame.
let tilted = false;
const animator = createCameraOrientationAnimator(viewer);
/** Recompute the tilt state exactly, paying for one pick. */
const refreshTilt = () => {
@@ -229,7 +308,19 @@ export function bindCameraOrientationControls({
removers.push(() => element.removeEventListener('click', handler));
};
listen(tiltButton, () => {
const result = runNavigation('camera', () => toggleCameraTilt(viewer));
const pending = animator.destination;
const result = runNavigation('camera', () => {
const frame = readCameraTargetFrame(viewer);
if (!frame) return false;
const nextTilted = !frameIsTilted(pending || frame);
const pitch = nextTilted ? OBLIQUE_PITCH : STRAIGHT_DOWN_PITCH;
return animator.animate(frame, {
heading: pending?.heading ?? frame.heading,
pitch,
})
? { tilted: nextTilted, pitch }
: false;
});
if (result) {
showToast?.(result.tilted ? 'Tilted view' : 'Straight-down view');
// The action reports the state it just commanded, so the button can
@@ -239,7 +330,17 @@ export function bindCameraOrientationControls({
sync();
});
listen(northButton, () => {
const result = runNavigation('camera', () => resetCameraNorth(viewer));
const pending = animator.destination;
const result = runNavigation('camera', () => {
const frame = readCameraTargetFrame(viewer);
return (
frame &&
animator.animate(frame, {
heading: 0,
pitch: pending?.pitch ?? frame.pitch,
})
);
});
if (result) showToast?.('North up');
sync();
});
@@ -255,14 +356,22 @@ export function bindCameraOrientationControls({
// The exact tilt state is refreshed once per gesture, not once per frame —
// moveEnd fires when the camera stops, which is where the pick is affordable.
subscribe(viewer?.camera?.moveEnd, refreshTilt);
subscribe(viewer?.trackedEntityChanged, animator.cancel);
for (const type of ['pointerdown', 'wheel']) {
const canvas = viewer?.scene?.canvas;
canvas?.addEventListener?.(type, animator.cancel, { passive: true });
removers.push(() => canvas?.removeEventListener?.(type, animator.cancel));
}
refreshTilt();
return {
sync,
refreshTilt,
cancel: animator.cancel,
destroy() {
if (destroyed) return;
destroyed = true;
animator.cancel();
for (const remove of removers.splice(0)) remove();
},
};
+172
View File
@@ -5,11 +5,13 @@ import {
OBLIQUE_PITCH,
STRAIGHT_DOWN_PITCH,
bindCameraOrientationControls,
createCameraOrientationAnimator,
pickViewTarget,
readCameraTargetFrame,
resetCameraNorth,
toggleCameraTilt,
} from './cameraOrientationControls.js';
import { NavigationController } from './navigationController.js';
function createViewer({ cameraPosition, target, pickPosition = null } = {}) {
const calls = [];
@@ -489,3 +491,173 @@ test('bindings route both controls and release every listener on destroy', () =>
assert.deepEqual(navigations, ['camera', 'camera']);
assert.equal(STRAIGHT_DOWN_PITCH, Cesium.Math.toRadians(-89));
});
for (const [label, altitude, range] of [
['aircraft', 10000, 1500],
['satellite', 400000, 1500000],
['high satellite', 35786000, 3000000],
]) {
test(`${label}: animated tilt and north retain a moving EntityView`, (t) => {
// Use Cesium's built-in TEME fallback without fetching Earth-orientation data.
t.mock.method(
Cesium.Transforms,
'computeFixedToIcrfMatrix',
() => undefined,
);
let target = Cesium.Cartesian3.fromDegrees(-97, 30, altitude);
const { viewer } = createRealViewer(target);
viewer.scene.preUpdate = new Cesium.Event();
viewer.clock = { currentTime: Cesium.JulianDate.now() };
const entity = new Cesium.Entity({
position: new Cesium.CallbackPositionProperty(() => target, false),
trackingReferenceFrame: Cesium.TrackingReferenceFrame.ENU,
});
entity.gevDisplayPosition = () => target;
viewer.trackedEntity = entity;
const follow = new Cesium.EntityView(entity, viewer.scene);
follow.update(viewer.clock.currentTime);
viewer.camera.lookAt(
target,
new Cesium.HeadingPitchRange(
Cesium.Math.toRadians(350),
OBLIQUE_PITCH,
range,
),
);
let time = 0;
const animator = createCameraOrientationAnimator(viewer, {
now: () => time,
duration: 1000,
});
for (const pitch of [STRAIGHT_DOWN_PITCH, OBLIQUE_PITCH]) {
const frame = readCameraTargetFrame(viewer);
animator.animate(frame, { heading: 0, pitch });
for (const step of [0, 100, 500, 900, 1000]) {
time = (pitch === STRAIGHT_DOWN_PITCH ? 0 : 1000) + step;
target = Cesium.Cartesian3.fromDegrees(
-97 + time / 100000,
30,
altitude,
);
follow.update(viewer.clock.currentTime);
const transform = Cesium.Matrix4.clone(viewer.camera.transform);
viewer.scene.preUpdate.raiseEvent();
assert.equal(viewer.trackedEntity, entity);
assert.ok(
Cesium.Matrix4.equalsEpsilon(
viewer.camera.transform,
transform,
1e-8,
),
);
const actual = readCameraTargetFrame(viewer);
const eased = Cesium.EasingFunction.CUBIC_IN_OUT(step / 1000);
assert.ok(
Math.abs(actual.pitch - Cesium.Math.lerp(frame.pitch, pitch, eased)) <
1e-6,
);
assert.ok(Math.abs(actual.range - range) < 1e-5);
}
assert.equal(viewer.scene.preUpdate.numberOfListeners, 0);
}
target = Cesium.Cartesian3.fromDegrees(-96, 31, altitude);
follow.update(viewer.clock.currentTime);
assert.equal(viewer.trackedEntity, entity);
assert.ok(Math.abs(readCameraTargetFrame(viewer).range - range) < 1e-5);
});
}
test('orientation animation cancels on replacement and explicit cancellation', () => {
const { viewer } = createRealViewer(Cesium.Cartesian3.fromDegrees(0, 0));
orbit(viewer, Cesium.Cartesian3.fromDegrees(0, 0), 90, OBLIQUE_PITCH, 1000);
viewer.scene.preUpdate = new Cesium.Event();
const animator = createCameraOrientationAnimator(viewer);
const frame = readCameraTargetFrame(viewer);
animator.animate(frame, { heading: 0, pitch: STRAIGHT_DOWN_PITCH });
animator.animate(frame, { heading: 0, pitch: OBLIQUE_PITCH });
assert.equal(viewer.scene.preUpdate.numberOfListeners, 1);
viewer.trackedEntity = {};
viewer.scene.preUpdate.raiseEvent();
assert.equal(viewer.scene.preUpdate.numberOfListeners, 0);
viewer.trackedEntity = undefined;
animator.animate(frame, { heading: 0, pitch: STRAIGHT_DOWN_PITCH });
animator.cancel();
assert.equal(viewer.scene.preUpdate.numberOfListeners, 0);
});
test('orientation navigation preserves follow and selection; new navigation cancels animation', () => {
const calls = [];
const entity = {};
const viewer = {
trackedEntity: entity,
camera: { cancelFlight: () => calls.push('cancel-flight') },
};
let cockpit = false;
const navigation = new NavigationController({
viewer,
tracking: {},
isCockpitActive: () => cockpit,
cancelOrientation: () => calls.push('cancel-orientation'),
clearLocation: () => calls.push('clear-location'),
cancelShareSelection: () => calls.push('clear-selection'),
interruptCameraMotion: () => calls.push('interrupt-motion'),
stopOrbit: () => calls.push('stop-orbit'),
showToast: () => calls.push('toast'),
});
assert.equal(
navigation.runOrientation('camera', () => 'animated'),
'animated',
);
assert.equal(viewer.trackedEntity, entity);
assert.deepEqual(calls, [
'cancel-orientation',
'interrupt-motion',
'stop-orbit',
'cancel-flight',
]);
calls.length = 0;
navigation._stampNavigation({ cancelPendingSelection: false });
assert.deepEqual(calls, ['cancel-orientation', 'clear-location']);
calls.length = 0;
cockpit = true;
assert.equal(
navigation.runOrientation('camera', () =>
assert.fail('cockpit should refuse'),
),
false,
);
assert.deepEqual(calls, ['toast']);
});
test('rapid tilt presses reverse direction and north-up keeps the requested tilt', (t) => {
let time = 0;
t.mock.method(performance, 'now', () => time);
const target = Cesium.Cartesian3.fromDegrees(0, 0);
const { viewer } = createRealViewer(target);
orbit(viewer, target, 90, OBLIQUE_PITCH, 1000);
viewer.scene.preUpdate = new Cesium.Event();
const tiltButton = new FakeButton();
const northButton = new FakeButton();
let controls;
controls = bindCameraOrientationControls({
viewer,
elements: { tiltButton, northButton },
runNavigation: (_noun, navigate) => {
controls.cancel();
return navigate();
},
});
tiltButton.click();
tiltButton.click();
assert.equal(tiltButton.getAttribute('aria-pressed'), 'true');
tiltButton.click();
northButton.click();
assert.equal(viewer.scene.preUpdate.numberOfListeners, 1);
time = 650;
viewer.scene.preUpdate.raiseEvent();
const frame = readCameraTargetFrame(viewer);
assert.ok(Math.abs(frame.pitch - STRAIGHT_DOWN_PITCH) < 1e-6);
assert.ok(Math.abs(frame.heading) < 1e-6);
controls.destroy();
assert.equal(viewer.scene.preUpdate.numberOfListeners, 0);
});
+75 -4
View File
@@ -11,6 +11,60 @@ const FEED_STATE_LABELS = Object.freeze({
unavailable: 'UNAVAILABLE',
});
// Presentation order is independent of catalog registration and startup order.
const PANEL_GROUPS = [
{
label: 'Movement',
ids: [
'satellites',
'flights',
'military',
'ais-live-vessels',
'traffic',
'bikeshare',
],
},
{
label: 'Cameras',
ids: ['cctv', 'alpr-cameras'],
},
{
label: 'Infrastructure',
ids: [
'military-installations',
'local-datacenters',
'telegeography-submarine-cables',
'local-dams',
],
},
{
label: 'Events',
ids: ['rocket-launches', 'earthquakes', 'local-firms'],
},
{
label: 'Utilities',
ids: ['directions', 'radio'],
},
];
const PANEL_ORDER = PANEL_GROUPS.flatMap(({ label, ids }) =>
ids.map((id) => ({ id, label })),
);
const PANEL_POSITIONS = new Map(
PANEL_ORDER.map(({ id }, index) => [id, index]),
);
const PANEL_LABELS = {
'ais-live-vessels': 'Live Vessels',
bikeshare: 'Bike Share',
cctv: 'Cameras',
'alpr-cameras': 'Mapped ALPR Cameras',
'local-datacenters': 'Data Centers',
'local-firms': 'Active Fires',
};
function panelLabel(layer) {
return PANEL_LABELS[layer.id] || layer.name;
}
/**
* Guidance for a control a missing provider key is holding back.
*
@@ -81,8 +135,25 @@ export class LayerPanel {
this._toggleContainer.innerHTML = '';
const generation = this._generation;
for (const layer of this.getAll()) {
const layers = this.getAll()
.slice()
.sort(
(a, b) =>
(PANEL_POSITIONS.get(a.id) ?? PANEL_ORDER.length) -
(PANEL_POSITIONS.get(b.id) ?? PANEL_ORDER.length),
);
let previousGroup = '';
for (const layer of layers) {
if (!layer.showInTogglePanel) continue;
const group =
PANEL_ORDER[PANEL_POSITIONS.get(layer.id)]?.label ?? 'Other layers';
if (group && group !== previousGroup) {
const heading = document.createElement('h3');
heading.className = 'data-layer-group-heading';
heading.textContent = group;
this._toggleContainer.appendChild(heading);
}
previousGroup = group;
const row = document.createElement('div');
row.className = 'data-toggle-row';
row.dataset.layerId = layer.id;
@@ -97,7 +168,7 @@ export class LayerPanel {
icon.textContent = layer.icon;
const name = document.createElement('span');
name.className = 'data-name';
name.textContent = layer.name;
name.textContent = panelLabel(layer);
left.appendChild(icon);
left.appendChild(name);
@@ -489,8 +560,8 @@ export class LayerPanel {
button.setAttribute(
'aria-label',
keyGuidance
? `${layer.name}: ${button.textContent}. ${keyGuidance}`
: `${layer.name}: ${button.textContent}`,
? `${panelLabel(layer)}: ${button.textContent}. ${keyGuidance}`
: `${panelLabel(layer)}: ${button.textContent}`,
);
}
+24
View File
@@ -18,6 +18,7 @@ export class NavigationController {
getDataManager,
stopOrbit,
showToast,
cancelOrientation = () => {},
}) {
Object.assign(this, {
viewer,
@@ -30,6 +31,7 @@ export class NavigationController {
getDataManager,
stopOrbit,
showToast,
cancelOrientation,
});
this._navigationGeneration = 0;
this._activeLocationSearchGeneration = null;
@@ -39,6 +41,7 @@ export class NavigationController {
cancelPendingSelection = true,
clearSearchedLocation = true,
} = {}) {
this.cancelOrientation();
const { flightsLayer, militaryFlightsLayer, satellitesLayer } =
this.tracking;
this._navigationGeneration += 1;
@@ -188,6 +191,27 @@ export class NavigationController {
});
}
/** Change the viewing angle without clearing selection or follow ownership. */
runOrientation(noun, navigate) {
return runExplicitNavigation({
disposed: this._disposed,
cockpitActive: this.isCockpitActive(),
noun,
showToast: (text) => this.showToast(text),
stamp: () =>
this._stampNavigation({
cancelPendingSelection: false,
clearSearchedLocation: false,
}),
release: () => {
this.interruptCameraMotion('camera-orientation');
this.stopOrbit();
this.viewer.camera.cancelFlight();
},
navigate,
});
}
_beginDeferredNavigation(
noun = 'location',
{ cancelPendingSelection = true } = {},
+38
View File
@@ -25,6 +25,11 @@ function fixture() {
appendChild(element) {
this.children.push(element);
}
setAttribute(name, value) {
this[name] = value;
}
focus() {}
select() {}
set textContent(value) {
this._text = value;
this.children = [];
@@ -164,6 +169,8 @@ test('Scene controls dispatch explicit actions and revoke replaced shot-row list
f.elements.start.click();
label.click();
label.dispatchEvent(new Event('dblclick'));
label.children[0].value = 'Renamed';
label.children[0].dispatchEvent(new Event('blur'));
load.click();
assert.deepEqual(f.calls, [
['capture'],
@@ -343,6 +350,8 @@ test('the real director preserves a selected shot label for the following double
label.click();
assert.equal(f.elements.shots.children[0].children[0].children[0], label);
label.dispatchEvent(new Event('dblclick'));
label.children[0].value = 'Renamed';
label.children[0].dispatchEvent(new Event('blur'));
assert.equal(director._getSelectedScene().shots[0].title, 'Renamed');
} finally {
await director?.destroy();
@@ -351,6 +360,35 @@ test('the real director preserves a selected shot label for the following double
}
});
test('inline shot names save on Enter, cancel on Escape, and reject blank names', () => {
const f = fixture();
const key = (name) => Object.assign(new Event('keydown'), { key: name });
try {
const label = f.elements.shots.children[0].children[0].children[0];
for (const [value, commitKey] of [
['Cancelled', 'Escape'],
[' ', 'Enter'],
[' New name ', 'Enter'],
]) {
label.dispatchEvent(new Event('dblclick'));
const input = label.children[0];
input.value = value;
input.dispatchEvent(key(commitKey));
input.dispatchEvent(new Event('blur'));
}
assert.deepEqual(f.calls, [
['renameShot', 'scene-a', 'shot-a', 'New name'],
]);
assert.equal(
label.textContent,
'<Shot A>',
'the model owns the next render',
);
} finally {
f.restore();
}
});
test('Scene controls consume current state, preserve rows on progress, and unsubscribe on destruction', () => {
const f = fixture();
try {
+28 -2
View File
@@ -61,10 +61,36 @@ export function renderSceneShots(
const label = document.createElement('div');
label.className = 'scene-shot-label';
label.textContent = shot.title;
label.title = 'Double-click to rename';
listen(label, 'click', () => select(shot.id));
listen(label, 'dblclick', () => {
const title = window.prompt('Shot title', shot.title);
if (title) rename(scene.id, shot.id, title);
if (label.children.length) return;
const input = document.createElement('input');
input.type = 'text';
input.className = 'scene-shot-rename';
input.setAttribute('aria-label', 'Shot name');
input.value = shot.title;
let finished = false;
const finish = (save) => {
if (finished) return;
finished = true;
const title = input.value.trim();
label.textContent = shot.title;
if (save && title && title !== shot.title)
rename(scene.id, shot.id, title);
};
listen(input, 'keydown', (event) => {
event.stopPropagation();
if (event.key === 'Enter' || event.key === 'Escape') {
event.preventDefault();
finish(event.key === 'Enter');
}
});
listen(input, 'blur', () => finish(true));
label.textContent = '';
label.appendChild(input);
input.focus();
input.select();
});
const actions = document.createElement('div');
actions.className = 'scene-shot-actions';
+613
View File
@@ -0,0 +1,613 @@
/* Bhote Koshi 2026 event reconstruction */
#bhote-koshi-event-panel {
position: fixed;
top: var(--right-stack-safe-top, 26vh);
right: var(--right-rail-x);
bottom: auto;
z-index: 142;
width: min(330px, calc(100vw - 40px));
max-height: calc(100vh - var(--right-stack-safe-top, 26vh) - 88px);
overflow-y: auto;
color: var(--text-primary);
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 6px;
box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48), inset 0 0 28px rgba(14, 78, 92, 0.12);
backdrop-filter: blur(24px) saturate(1.4);
font-family: var(--font-mono);
letter-spacing: 0;
pointer-events: auto;
scrollbar-width: none;
}
#bhote-koshi-event-panel::-webkit-scrollbar {
display: none;
}
#bhote-koshi-event-panel [hidden],
#bhote-koshi-split-line[hidden] {
display: none !important;
}
#bhote-koshi-embedded-media-root {
position: absolute;
inset: 0;
z-index: 7;
overflow: hidden;
pointer-events: none;
}
.bhote-embedded-media-warmup {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
clip-path: inset(50%);
}
.bhote-embedded-callout {
position: absolute;
box-sizing: border-box;
width: min(356px, calc(100% - 36px));
max-height: min(270px, calc(100% - 36px));
overflow: visible;
color: var(--text-primary);
font-family: var(--font-mono);
pointer-events: none;
}
.bhote-embedded-callout[hidden] {
display: none !important;
}
.bhote-embedded-callout-leader {
position: absolute;
top: 0;
left: 0;
z-index: 0;
width: 1px;
height: 1px;
overflow: visible;
pointer-events: none;
}
.bhote-embedded-callout-leader circle {
opacity: 0;
transform: scale(0.2);
transform-box: fill-box;
transform-origin: center;
}
.bhote-embedded-callout-leader path {
opacity: 0;
stroke-dasharray: 1;
stroke-dashoffset: 1;
}
.bhote-embedded-callout-body {
position: relative;
z-index: 1;
overflow: hidden;
background: rgba(5, 13, 19, 0.96);
border: 1px solid rgba(107, 232, 255, 0.32);
box-shadow: 0 18px 46px rgba(0, 0, 0, 0.56);
opacity: 0;
transform: translateY(8px) scale(0.98);
pointer-events: auto;
}
.bhote-embedded-callout-player {
width: 100%;
height: min(200px, 34vh);
aspect-ratio: 16 / 9;
min-height: 0;
overflow: hidden;
background: #03080d;
scrollbar-width: thin;
scrollbar-color: rgba(107, 232, 255, 0.36) transparent;
}
.bhote-embedded-callout.is-youtube {
width: min(280px, calc(100% - 36px));
max-height: min(228px, calc(100% - 36px));
}
.bhote-embedded-callout.is-youtube .bhote-embedded-callout-player {
height: min(158px, 27vh);
}
.bhote-embedded-callout.is-portrait {
width: min(214px, calc(100% - 36px));
max-height: min(390px, calc(100% - 36px));
}
.bhote-embedded-callout.is-portrait .bhote-embedded-callout-player {
width: 100%;
height: min(320px, 48vh);
aspect-ratio: 9 / 16;
}
.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader circle {
animation: bhote-embedded-anchor-enter 240ms ease-out both;
}
.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader path {
animation: bhote-embedded-leader-enter 420ms 150ms ease-out both;
}
.bhote-embedded-callout.is-entering .bhote-embedded-callout-body {
animation: bhote-embedded-body-enter 420ms 510ms ease-out both;
}
.bhote-embedded-callout.is-leaving .bhote-embedded-callout-body {
animation: bhote-embedded-body-exit 240ms ease-in both;
}
.bhote-embedded-callout.is-leaving .bhote-embedded-callout-leader path {
animation: bhote-embedded-leader-exit 300ms 190ms ease-in both;
}
.bhote-embedded-callout.is-leaving .bhote-embedded-callout-leader circle {
animation: bhote-embedded-anchor-exit 160ms 460ms ease-in both;
}
@keyframes bhote-embedded-anchor-enter {
from { opacity: 0; transform: scale(0.2); }
to { opacity: 1; transform: scale(1); }
}
@keyframes bhote-embedded-leader-enter {
from { opacity: 0; stroke-dashoffset: 1; }
to { opacity: 1; stroke-dashoffset: 0; }
}
@keyframes bhote-embedded-body-enter {
from { opacity: 0; transform: translateY(8px) scale(0.98); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bhote-embedded-body-exit {
from { opacity: 1; transform: translateY(0) scale(1); }
to { opacity: 0; transform: translateY(6px) scale(0.985); }
}
@keyframes bhote-embedded-leader-exit {
from { opacity: 1; stroke-dashoffset: 0; }
to { opacity: 0; stroke-dashoffset: 1; }
}
@keyframes bhote-embedded-anchor-exit {
from { opacity: 1; transform: scale(1); }
to { opacity: 0; transform: scale(0.2); }
}
@media (prefers-reduced-motion: reduce) {
.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader circle,
.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader path,
.bhote-embedded-callout.is-entering .bhote-embedded-callout-body {
animation: none;
opacity: 1;
transform: none;
stroke-dashoffset: 0;
}
}
.bhote-embedded-callout.is-x .bhote-embedded-callout-player {
max-height: min(200px, 34vh);
aspect-ratio: auto;
overflow: auto;
}
.bhote-embedded-callout:not(.is-x) .bhote-embedded-callout-player iframe {
display: block;
width: 100%;
height: 100%;
min-height: 0;
border: 0;
}
.bhote-facebook-player-host {
width: 100%;
height: 100%;
}
.bhote-embedded-callout.is-x .bhote-embedded-callout-player iframe {
display: block;
width: 100% !important;
max-width: 100% !important;
min-height: 0;
border: 0;
}
.bhote-embedded-callout.is-x .bhote-embedded-callout-player > * {
margin: 0 auto !important;
}
.bhote-embedded-callout.is-unavailable .bhote-embedded-callout-player {
min-height: 92px;
background: repeating-linear-gradient(
135deg,
rgba(107, 232, 255, 0.06),
rgba(107, 232, 255, 0.06) 12px,
rgba(3, 8, 13, 0.92) 12px,
rgba(3, 8, 13, 0.92) 24px
);
}
.bhote-embedded-callout footer {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 2px 8px;
padding: 7px 9px 8px;
border-top: 3px solid #6be8ff;
}
.bhote-embedded-callout footer strong {
overflow: hidden;
font-size: 11px;
line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
.bhote-embedded-callout footer small {
grid-column: 1;
color: rgba(151, 211, 224, 0.7);
font-size: 8px;
line-height: 1.35;
}
.bhote-embedded-callout footer a {
grid-column: 2;
grid-row: 1 / span 2;
align-self: center;
color: #6be8ff;
font-size: 8px;
text-decoration: none;
}
.bhote-embedded-callout footer a:hover,
.bhote-embedded-callout footer a:focus-visible {
text-decoration: underline;
}
#right-context-rail.bhote-event-active > :not(#bhote-koshi-event-panel) {
display: none !important;
}
.bhote-event-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 14px;
padding: 15px 16px 12px;
border-bottom: 1px solid rgba(95, 213, 236, 0.18);
}
.bhote-event-kicker,
.bhote-event-section-head,
.bhote-event-status,
.bhote-event-evidence summary,
.bhote-event-report small {
font-size: 9px;
line-height: 1.35;
text-transform: uppercase;
color: var(--accent);
opacity: 0.72;
}
.bhote-event-title {
margin-top: 5px;
font-size: 17px;
line-height: 1.2;
color: var(--text-primary);
}
.bhote-event-icon-btn {
flex: 0 0 30px;
width: 30px;
height: 30px;
padding: 0;
border: 1px solid rgba(151, 211, 224, 0.26);
border-radius: 4px;
color: var(--text-primary);
background: var(--accent-dim);
font: inherit;
font-size: 18px;
cursor: pointer;
}
.bhote-event-status-row {
display: flex;
gap: 8px;
padding: 11px 16px 0;
}
.bhote-event-status {
padding: 4px 7px;
border: 1px solid rgba(80, 206, 231, 0.24);
border-radius: 3px;
background: var(--accent-dim);
}
.bhote-event-status.reconstructed {
color: var(--accent);
border-color: rgba(80, 206, 231, 0.24);
background: var(--accent-dim);
}
.bhote-event-section {
padding: 13px 16px 0;
}
.bhote-event-section-head,
.bhote-event-dates,
.bhote-event-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.bhote-event-section-head span:last-child {
color: rgba(222, 240, 245, 0.88);
}
.bhote-event-range {
width: 100%;
height: 4px;
margin: 11px 0 8px;
accent-color: var(--accent);
cursor: ew-resize;
}
.bhote-event-range.flood {
accent-color: var(--accent);
cursor: pointer;
}
.bhote-event-dates {
font-size: 8px;
color: rgba(174, 208, 216, 0.62);
}
.bhote-event-story-nav {
display: grid;
grid-template-columns: 34px minmax(0, 1fr) 34px;
align-items: stretch;
gap: 6px;
margin-top: 10px;
}
.bhote-event-story-nav > button {
width: 34px;
min-height: 54px;
padding: 0;
border: 1px solid rgba(88, 196, 218, 0.3);
border-radius: 4px;
color: var(--accent);
background: rgba(7, 25, 35, 0.9);
font: 22px/1 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
cursor: pointer;
}
.bhote-event-story-current {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-content: center;
column-gap: 9px;
min-width: 0;
padding: 7px 10px;
border: 1px solid rgba(88, 196, 218, 0.18);
background: rgba(6, 19, 27, 0.72);
}
.bhote-event-story-current span,
.bhote-event-story-current small {
color: rgba(116, 216, 235, 0.7);
font-size: 8px;
line-height: 1.25;
}
.bhote-event-story-current strong {
overflow: hidden;
color: var(--text-primary);
font-size: 11px;
line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
.bhote-event-story-current small {
grid-column: 1 / -1;
margin-top: 4px;
overflow: hidden;
color: rgba(116, 216, 235, 0.7);
text-overflow: ellipsis;
white-space: nowrap;
}
.bhote-event-actions {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
justify-content: flex-start;
margin-top: 9px;
}
.bhote-event-actions button,
.bhote-event-report {
border: 1px solid rgba(88, 196, 218, 0.24);
border-radius: 4px;
color: var(--text-primary);
background: rgba(7, 25, 35, 0.9);
font: inherit;
font-size: 9px;
letter-spacing: 0;
cursor: pointer;
}
.bhote-event-actions button {
min-width: 0;
min-height: 30px;
padding: 0 5px;
overflow: hidden;
font-size: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
.bhote-event-actions button:disabled,
.bhote-event-story-nav > button:disabled {
opacity: 0.3;
cursor: default;
}
.bhote-event-actions button:first-child {
color: var(--accent);
border-color: rgba(88, 196, 218, 0.36);
}
.bhote-event-actions button[data-action="cinematic"][aria-pressed="true"] {
color: #071017;
border-color: var(--accent);
background: var(--accent);
}
.bhote-event-evidence {
margin: 13px 16px 0;
border-top: 1px solid rgba(95, 213, 236, 0.16);
border-bottom: 1px solid rgba(95, 213, 236, 0.16);
}
.bhote-event-evidence summary {
padding: 10px 0;
cursor: pointer;
}
.bhote-event-report-list {
display: grid;
gap: 6px;
padding-bottom: 10px;
}
.bhote-event-report {
display: grid;
gap: 3px;
width: 100%;
padding: 8px 9px;
text-align: left;
}
.bhote-event-report span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bhote-event-report small {
color: rgba(115, 210, 228, 0.58);
}
.bhote-event-credit {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin: 10px 16px 0;
padding: 8px 0 0;
border-top: 1px solid rgba(95, 213, 236, 0.16);
color: rgba(116, 216, 235, 0.62);
font-size: 8px;
line-height: 1.35;
}
.bhote-event-credit button {
flex: 0 0 auto;
min-height: 26px;
padding: 0 8px;
border: 1px solid rgba(88, 196, 218, 0.24);
border-radius: 4px;
color: var(--text-primary);
background: rgba(7, 25, 35, 0.9);
font: inherit;
cursor: pointer;
}
.bhote-event-caveat {
margin: 11px 16px 14px;
font-size: 8px;
line-height: 1.5;
color: rgba(179, 204, 210, 0.62);
}
#bhote-koshi-split-line {
position: fixed;
top: 0;
bottom: 0;
left: var(--bhote-koshi-split, 50%);
z-index: 8;
width: 1px;
pointer-events: none;
background: rgba(218, 241, 247, 0.76);
box-shadow: 0 0 12px rgba(94, 216, 239, 0.72);
}
#bhote-koshi-split-line span {
display: none;
}
#bhote-koshi-split-line .bhote-koshi-split-handle {
position: absolute;
top: 50%;
left: 50%;
width: 36px;
height: 36px;
padding: 0;
border: 1px solid rgba(180, 215, 222, 0.72);
border-radius: 50%;
outline: 0;
color: rgba(239, 247, 249, 0.96);
background: rgba(4, 17, 27, 0.96);
box-shadow:
0 0 0 5px rgba(62, 112, 125, 0.3),
0 0 13px rgba(94, 216, 239, 0.3);
font: 700 14px/1 var(--font-mono);
transform: translate(-50%, -50%);
pointer-events: auto;
touch-action: none;
cursor: ew-resize;
}
#bhote-koshi-split-line .bhote-koshi-split-handle:focus-visible {
outline: 2px solid #fff;
outline-offset: 4px;
}
@media (max-width: 720px) {
#bhote-koshi-event-panel {
right: 12px;
bottom: 88px;
width: calc(100vw - 24px);
max-height: 48vh;
overflow-y: auto;
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background: var(--bg-dark);
font-family: var(--font-sans);
color: var(--text-primary);
-webkit-font-smoothing: antialiased;
}
+17
View File
@@ -107,6 +107,23 @@
border-radius: 999px;
}
.data-layer-group-heading {
margin: 8px 10px 2px;
padding-top: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
color: var(--text-secondary);
font-size: 10px;
font-weight: 600;
letter-spacing: 1.4px;
text-transform: uppercase;
}
.data-layer-group-heading:first-child {
margin-top: 0;
padding-top: 4px;
border-top: 0;
}
.data-toggle-row {
padding: 8px 10px 6px;
border-radius: 8px;
+12
View File
@@ -244,12 +244,24 @@
}
.scene-shot-label {
min-width: 0;
flex: 1;
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 1px;
color: var(--text-primary);
}
.scene-shot-rename {
width: 100%;
min-width: 0;
box-sizing: border-box;
font: inherit;
color: var(--text-primary);
background: var(--bg-panel, #101820);
border: 1px solid var(--accent, #00d4ff);
}
.scene-shot-meta {
margin-top: 4px;
font-family: var(--font-mono);
+11
View File
@@ -253,6 +253,17 @@ export class VisualSettings {
effective === 'nvg';
this._dataManager?.setLayerParams('flights', { irBoost });
this._dataManager?.setLayerParams('military', { irBoost });
// Layers whose in-scene sprites restyle for a sensor preset need the
// EFFECTIVE style — a cockpit vision override sets no map style, so the
// map's own style event never fires for it.
window.dispatchEvent(
new CustomEvent('gev:vision-change', {
detail: {
style: effective,
cockpit: Boolean(cockpitMode && cockpitMode !== 'optical'),
},
}),
);
// Fog blends distant geometry toward an effectively-BLACK color in this
// app (the Cesium globe is hidden), so beyond ~100 km every 3D aircraft
// fogs to a black silhouette — lighting and shaders can't reach past it