mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
perf(shipwrecks): draw the wreck markers from one billboard collection, on the wreck, and rebuild them only on new data
- The ~8,000 markers were one Cesium entity each; they are now one BillboardCollection (as FIRMS, vessels and wildlife sightings do), ordered at the bottom of the shared sprite stack so moving traffic draws over it. - eyeOffset.z was the death toll in metres, so a 1,500-death wreck's marker sat 1.5 km toward the camera and clipped or drifted when close. It is gone; markers are added by rising toll, so a bigger toll still draws on top. - The page asks every 6 h but the proxy changes data at most daily: the proxy now sends a version that changes with either source's data, and the layer rebuilds only when it does. - Adds a controller test: enable/disable, teardown, draw order, unchanged snapshots, a late response after turning off, and the period closing an open card.
This commit is contained in:
1 parent
3b52e24140
commit
38ba8a3b59
7 files changed
+275
-34
No files matched your search
@@ -189,10 +189,12 @@ test('one source failing keeps its own last records while the other refreshes',
|
||||
const handler = handlerOf(
|
||||
shipwrecksProxy({ fetchImpl: upstream.fetchImpl, now: () => clock }),
|
||||
);
|
||||
await request(handler);
|
||||
const first = await request(handler);
|
||||
assert.equal((await request(handler)).body.version, first.body.version);
|
||||
upstream.state.wikidata = 'down';
|
||||
clock = 25 * HOUR;
|
||||
const later = await request(handler);
|
||||
assert.notEqual(later.body.version, first.body.version, 'new EMODnet data');
|
||||
assert.equal(later.body.records.length, 2);
|
||||
assert.deepEqual(later.body.sources, { emodnet: true, wikidata: true });
|
||||
assert.equal(later.body.stale, true);
|
||||
|
||||
Reference in new issue
Block a user