Cross-fade Active Fires markers and heatmap; fix the spot size

The far-zoom heatmap now uses the ½× grid (4096 × 2048, ≈10 km per
pixel, one-pixel blur), so a lone fire's spot matches its marker at the
3,000 km hand-off. The spot size slider and its share option are gone.

Markers and heatmap are both kept built at every zoom and cross-fade by
camera height between 2,400 and 3,600 km on every frame, so a fast zoom
never shows a beat with neither. The heatmap fades by imagery alpha:
hiding a Cesium imagery layer unmaps it from the globe tiles, and showing
it again re-mapped them late, which was the gap at the band edge. Under
the markers the heatmap is built 150 ms after the data or filter changes.
This commit is contained in:
German Khokhlov committed 2026-11-03 20:41:50 +04:00
1 parent 4e950d04e9
commit f01200b467
31 files changed
+372 -528

No files matched your search

+11 -8
View File
@@ -470,7 +470,7 @@ export class LayerPanel {
}
/**
* A layer's row chips, one-of-many switch, sliders, color legend, info line
* A layer's row chips, one-of-many switch, slider, color legend, info line
* and ordered list. The block
* is hidden while the layer is off (or while a dependency owner has
* surrendered it), so a quiet row stays quiet. Chips and list items are
@@ -496,7 +496,7 @@ export class LayerPanel {
}));
const infoText = controls?.info ? String(controls.info) : '';
const segmented = controls?.segmented || null;
const sliders = Array.isArray(controls?.sliders) ? controls.sliders : [];
const slider = controls?.slider || null;
// The info line, once shown, stays in place and hides when empty.
if (infoText) row.info = true;
return {
@@ -505,10 +505,10 @@ export class LayerPanel {
legend.length === 0 &&
!infoText &&
!segmented &&
sliders.length === 0,
!slider,
chips,
segmented,
sliders,
slider,
legend,
info: row.info
? { text: infoText, title: controls?.infoTitle || '' }
@@ -562,10 +562,13 @@ export class LayerPanel {
// to params through the live descriptor on every tick.
_moveSlider(id, sliderId, value, generation = this._generation) {
if (this._destroyed || this._generation !== generation) return;
const slider = this._rowControlsFor(id)?.sliders?.find(
(entry) => entry.id === sliderId,
);
if (!slider || typeof slider.params !== 'function' || !this.isEnabled(id))
const slider = this._rowControlsFor(id)?.slider;
if (
!slider ||
slider.id !== sliderId ||
typeof slider.params !== 'function' ||
!this.isEnabled(id)
)
return;
this.setLayerParams(id, slider.params(value), { origin: 'user' });
}
+5 -4
View File
@@ -63,10 +63,11 @@ defineProps({
:segmented="item.controls.segmented"
:on-select="(optionId) => onChip(item.id, optionId)"
/><RowSlider
v-for="slider in item.controls.sliders || []"
:key="slider.id"
:slider="slider"
:on-input="(value) => onSlider(item.id, slider.id, value)"
v-if="item.controls.slider"
:slider="item.controls.slider"
:on-input="
(value) => onSlider(item.id, item.controls.slider.id, value)
"
/><span
v-for="(entry, index) in item.controls.legend"
:key="index"
+19 -47
View File
@@ -66,40 +66,28 @@ const fireRow = (value, active = 'all') => ({
active: mode === active,
})),
},
sliders: [
{
id: 'min-frp',
label: 'Fire intensity (FRP)',
ariaLabel: 'Minimum fire radiative power, megawatts',
valueText: value ? `≥ ${value} MW` : 'All',
min: 0,
max: 1000,
step: 1,
value,
track: 'linear-gradient(90deg, #9e2a1b, #fff3b0)',
ticks: [
{ at: 0, label: '0' },
{ at: 0.5, label: '30' },
],
},
{
id: 'heat-spot-size',
label: 'Heatmap spot size',
ariaLabel: 'Far-zoom heatmap spot size',
valueText: '1×',
min: 0,
max: 1000,
value: 333,
ticks: [{ at: 1 / 3, label: '1×' }],
},
],
slider: {
id: 'min-frp',
label: 'Fire intensity (FRP)',
ariaLabel: 'Minimum fire radiative power, megawatts',
valueText: value ? `≥ ${value} MW` : 'All',
min: 0,
max: 1000,
step: 1,
value,
track: 'linear-gradient(90deg, #9e2a1b, #fff3b0)',
ticks: [
{ at: 0, label: '0' },
{ at: 0.5, label: '30' },
],
},
legend: [],
info: null,
list: null,
},
});
test('a row switch and sliders render their markup and report choices', () => {
test('a row switch and slider render their markup and report choices', () => {
document.body.replaceChildren();
const container = document.body.appendChild(document.createElement('div'));
const chips = [];
@@ -127,13 +115,8 @@ test('a row switch and sliders render their markup and report choices', () => {
segments[1].click();
assert.deepEqual(chips, [['fires', 'confidence-high']]);
const blocks = [...container.querySelectorAll('.data-toggle-slider')];
assert.deepEqual(
blocks.map((entry) => entry.dataset.sliderId),
['min-frp', 'heat-spot-size'],
'sliders render in order, after the switch',
);
const [block, spotBlock] = blocks;
const block = container.querySelector('.data-toggle-slider');
assert.equal(block.dataset.sliderId, 'min-frp');
assert.equal(
block.querySelector('.data-toggle-slider-label').textContent,
'Fire intensity (FRP)',
@@ -164,18 +147,7 @@ test('a row switch and sliders render their markup and report choices', () => {
input.value = '120';
input.dispatchEvent(new Event('input', { bubbles: true }));
const spotInput = spotBlock.querySelector('input.data-toggle-slider-input');
assert.equal(
spotInput.getAttribute('aria-label'),
'Far-zoom heatmap spot size',
);
assert.equal(spotInput.style.getPropertyValue('--slider-track'), '');
spotInput.value = '700';
spotInput.dispatchEvent(new Event('input', { bubbles: true }));
assert.deepEqual(moves, [
['fires', 'min-frp', 120],
['fires', 'heat-spot-size', 700],
]);
assert.deepEqual(moves, [['fires', 'min-frp', 120]]);
// The refresh that tick triggers keeps the same nodes and updates the text.
render(h(LayerRows, { items: [fireRow(120, 'high')], ...props }), container);