mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Draw Local ADS-B aircraft models through the draw port
Local ADS-B's 3D aircraft are now one models set of the renderer's draw port, re-posed in place each frame, instead of Cesium models of their own. Ground placement samples heights through the query port and sees through the layer's sets by id; clicks read the dispatcher's draw-set hit and the query port's drill. A class change keeps the drawn model, at its own belly offset, until the new asset is ready; a scale-only change applies at once. The models file leaves the Cesium allow-list. Cesium model sets retry a failed load when its item is next updated after a short wait, and parse an item's tint only when it changes.
This commit is contained in:
1 parent
20155ff3fa
commit
20fdfd492e
10 files changed
+502
-375
No files matched your search
@@ -19,6 +19,7 @@ export function fakeDrawPort() {
|
||||
show: spec.show !== false,
|
||||
disposed: false,
|
||||
writes: 0,
|
||||
ready: new Set(),
|
||||
};
|
||||
sets.set(spec.id, record);
|
||||
const write = (fn) => {
|
||||
@@ -53,7 +54,11 @@ export function fakeDrawPort() {
|
||||
set show(value) {
|
||||
record.show = value;
|
||||
},
|
||||
on: () => () => {},
|
||||
on(event, cb) {
|
||||
if (event !== 'ready') return () => {};
|
||||
record.ready.add(cb);
|
||||
return () => record.ready.delete(cb);
|
||||
},
|
||||
dispose() {
|
||||
record.disposed = true;
|
||||
},
|
||||
@@ -72,6 +77,11 @@ export function fakeDrawPort() {
|
||||
points: make('points'),
|
||||
lines: make('lines'),
|
||||
shapes: make('shapes'),
|
||||
models: make('models'),
|
||||
/** Fire a models set's `ready` for an item, as a load finishing does. */
|
||||
ready(setId, id) {
|
||||
for (const cb of [...(sets.get(setId)?.ready ?? [])]) cb(id);
|
||||
},
|
||||
clampState: () => 'draped',
|
||||
on: () => () => {},
|
||||
atlas() {},
|
||||
|
||||
Reference in new issue
Block a user