mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Sprites for helicopters, ground vehicles, stations and vessel types; history to live without an empty map; model parts in Cesium
Aircraft icons are one size; helicopters turn a three-frame rotor while airborne or moving; ADS-B ground vehicles share one amber sprite and stations/obstacles one mast; vessels get hull sprites by type and one buoy. Going live keeps contacts until the first live answer and replaces them by id; fast playback holds before the loaded positions end and prefetches ahead. Cesium models move their parts from the optional model part state.
This commit is contained in:
1 parent
624c229bc2
commit
7186f720df
97 files changed
+6586
-343
No files matched your search
@@ -5312,10 +5312,14 @@ export function createCesiumDraw({
|
||||
replaceHost,
|
||||
horizonNow,
|
||||
requestRender,
|
||||
parts: capabilities.has('modelParts'),
|
||||
now,
|
||||
});
|
||||
const buildModels = (record) => modelSets.build(record);
|
||||
// Whether shapes pulsed in the last frame, which draws on in the next.
|
||||
let pulsing = false;
|
||||
// Whether a shown model's parts spun in the last frame, likewise.
|
||||
let spinning = false;
|
||||
const lineWidth = (px) =>
|
||||
typeof scene.clampLineWidth === 'function'
|
||||
? scene.clampLineWidth(px)
|
||||
@@ -5452,7 +5456,7 @@ export function createCesiumDraw({
|
||||
turnInertial(record);
|
||||
record.drapeInertial?.();
|
||||
}
|
||||
modelSets.beforeRender(sets.values());
|
||||
spinning = modelSets.beforeRender(sets.values());
|
||||
quadSets.beforeRender(sets.values());
|
||||
},
|
||||
/** Each frame, after it drew: clamp state, and ground swaps. */
|
||||
@@ -5483,7 +5487,8 @@ export function createCesiumDraw({
|
||||
// Rows moving on a live clock, and flowing lines, draw on in the
|
||||
// frames that follow.
|
||||
const playing = quadSets.afterRender(sets.values());
|
||||
if (anySet(animating) || flowing() || pulsing || playing) requestRender();
|
||||
if (anySet(animating) || flowing() || pulsing || spinning || playing)
|
||||
requestRender();
|
||||
},
|
||||
/**
|
||||
* Let go of the sets; with `removeHosts`, take what they draw out of
|
||||
@@ -5494,6 +5499,8 @@ export function createCesiumDraw({
|
||||
clampListeners.clear();
|
||||
// Fields go with the port, and their frame listeners with them.
|
||||
fieldPart.dispose();
|
||||
// Part shaders and their textures go with it too.
|
||||
modelSets.dispose();
|
||||
// Late model loads find no host and destroy themselves.
|
||||
for (const record of sets.values()) {
|
||||
if (removeHosts && !scene.isDestroyed?.()) {
|
||||
@@ -5538,7 +5545,7 @@ provideUnboundDraw((viewer) => {
|
||||
const part = createCesiumDraw({
|
||||
scene,
|
||||
report: uncaught,
|
||||
capabilities: new Set([...GPU_ICON_CAPABILITIES, 'fields']),
|
||||
capabilities: new Set([...GPU_ICON_CAPABILITIES, 'fields', 'modelParts']),
|
||||
});
|
||||
unboundParts.set(part.port, part);
|
||||
const offs = [
|
||||
|
||||
Reference in new issue
Block a user