mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Read aircraft model placement from the app's mirror
Flights, military and local ADS-B now write their models' show and world matrix through setModel in src/data/modelMirror.js, and read them back through modelState: the fleet and tracked handoffs, the tracked visual and trail anchors, detection anchors and modelAnchorWorld. A matrix is copied into the app's record and into the model's own matrix, so the shared scratch can be passed directly and models still never share one matrix object. What Cesium measures (ready, computedScale) is still read from the model, and colour stays live as on billboards, because cyber sonar writes it too. Test seams mirror the models they install, as they do billboards.
This commit is contained in:
1 parent
6639c4bb80
commit
05904edfc9
15 files changed
+273
-88
No files matched your search
@@ -36,6 +36,7 @@ import {
|
||||
DISPLAY_CORRIDOR_FAIR_SHARE,
|
||||
} from './policy.js';
|
||||
import { billboardState, setBillboard } from '../../data/billboardMirror.js';
|
||||
import { modelState } from '../../data/modelMirror.js';
|
||||
|
||||
export function createMotion({
|
||||
flightState,
|
||||
@@ -530,7 +531,7 @@ export function createMotion({
|
||||
flightState.records.data.get(flightState._trackedIcao)?.klass,
|
||||
);
|
||||
return modelVisualAnchor(
|
||||
flightState._trackedModel.modelMatrix,
|
||||
modelState(flightState._trackedModel).modelMatrix,
|
||||
spec.visualCenterNative,
|
||||
Number.isFinite(flightState._trackedModel.computedScale)
|
||||
? flightState._trackedModel.computedScale
|
||||
@@ -559,7 +560,7 @@ export function createMotion({
|
||||
)
|
||||
return null;
|
||||
return Cesium.Matrix4.getTranslation(
|
||||
flightState._trackedModel.modelMatrix,
|
||||
modelState(flightState._trackedModel).modelMatrix,
|
||||
flightState._scratchTrailClip,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user