mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Stop Navara's memory growth on engine switches, hide polygon zones reliably, and drop the Cesium camera rig
- Navara 0.2.1 never frees pick batch ids, and the mover banks rebuilt their instanced meshes on each attach, leaking about 260 KiB of WebAssembly memory per switch. A per-view pool hands released ids back out; the long soak now asserts native growth of at most 32 KiB per switch. - Navara 0.2.1 sometimes drops the first show:false update on a new vector layer, so a zone turned off right after a switch back stayed drawn. Polygon displays hide by deleting their layers and rebuild them when shown. - Camera verbs drive both engines through the globe contract; the Cesium viewer rig and the tests of states it can no longer reach are gone. - Flights and military tracking share src/layers/aircraft/tracking.js. - The geo import scenario reads movers only where the engine has them. - Add the Navara section to docs/CURRENT-STATE.md and a changelog fragment.
This commit is contained in:
1 parent
7abf74518f
commit
a6c64713ee
46 files changed
+2367
-2894
No files matched your search
@@ -126,6 +126,33 @@ test('retarget switches the tracked entity without ending the follow', () => {
|
||||
assert.deepEqual(changes, [handle, handle]);
|
||||
});
|
||||
|
||||
test('a follow on an Entity names it, as the tracked camera is named', () => {
|
||||
const { viewer, camera } = setup();
|
||||
// An entity the app tracked itself: its name, else its id.
|
||||
viewer.trackedEntity = new Cesium.Entity({ id: 'N123AB', name: 'UAL 12' });
|
||||
assert.equal(camera.following().name, 'UAL 12');
|
||||
viewer.trackedEntity = new Cesium.Entity({ id: 'N456CD' });
|
||||
assert.equal(camera.following().name, 'N456CD');
|
||||
// The engine's own follow of a native entity; a proxy follow has none.
|
||||
const native = new Cesium.Entity({
|
||||
id: 'ISS',
|
||||
position: Cesium.Cartesian3.clone(TARGET),
|
||||
viewFrom: new Cesium.Cartesian3(0, -900, 400),
|
||||
});
|
||||
const handle = camera.follow({
|
||||
native,
|
||||
position: () => TARGET,
|
||||
viewFrom: { x: 0, y: -900, z: 400 },
|
||||
});
|
||||
assert.equal(handle.name, 'ISS');
|
||||
const proxy = camera.follow({
|
||||
position: () => TARGET,
|
||||
viewFrom: { x: 0, y: -900, z: 400 },
|
||||
});
|
||||
assert.equal(proxy.name, undefined);
|
||||
proxy.stop();
|
||||
});
|
||||
|
||||
test('destroy ends an engine follow and leaves an app-tracked entity alone', () => {
|
||||
const first = setup();
|
||||
first.camera.follow({
|
||||
|
||||
Reference in new issue
Block a user