mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Merge origin/main into the renderer-contract branch: the procedural fleet models drawn through the renderer's model sets
Aircraft, military, local ADS-B, vessel, transit and rail models come from the fleet model set, loaded up front and drawn life size through the draw port's models sets; no layer touches the viewer or Cesium outside src/render/cesium/. The models capability gains glTF bytes (gltf), a per-axis stretch (axisScale), a colour for tinted parts (maskColor) and a cut below the origin (clip: 'belowOrigin'), with conformance checks. Main's rail layer and Data Library are ported to the ports; the CCTV footprint probe keeps the globe-terrain clamp through the query port.
This commit is contained in:
commit
e3865f462f
533 files changed
+55738
-2518
No files matched your search
@@ -30,6 +30,8 @@ export function createStubHarness(name = 'stub') {
|
||||
assets: {
|
||||
model: 'stub:model.glb',
|
||||
missingModel: `${STUB_FAILING_MODEL_SCHEME}model.glb`,
|
||||
// Any bytes: the stub parses none.
|
||||
modelBytes: async () => new Uint8Array([0x67, 0x6c, 0x54, 0x46]),
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -407,7 +407,7 @@ export function createStubRenderer(options = {}) {
|
||||
log('draw', kind, [spec]);
|
||||
// A model is ready once per load: when it is new or its url changes,
|
||||
// not when it is moved or restyled. One under the failing scheme fails
|
||||
// its load instead.
|
||||
// its load instead, unless it came with its bytes (`gltf`).
|
||||
// Each load is told once: a listener that starts another load of the
|
||||
// same item (or removes it) supersedes the one queued here.
|
||||
const loadTokens = new Map();
|
||||
@@ -427,8 +427,10 @@ export function createStubRenderer(options = {}) {
|
||||
for (const [id, token] of loading) {
|
||||
if (loadTokens.get(id) !== token || !record.items.has(id)) continue;
|
||||
loadTokens.delete(id);
|
||||
const url = String(record.items.get(id).url ?? '');
|
||||
if (url.startsWith(STUB_FAILING_MODEL_SCHEME))
|
||||
const item = record.items.get(id);
|
||||
const url = String(item.url ?? '');
|
||||
// A model given its bytes is drawn from them: its url is not fetched.
|
||||
if (!item.gltf && url.startsWith(STUB_FAILING_MODEL_SCHEME))
|
||||
deliver(record.loadFailedListeners, id, `${url} does not load`);
|
||||
else deliver(record.readyListeners, id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user