mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Compute aircraft model anchors and drawn scale without Cesium
Model visual anchors now turn glTF axes into the placed frame with plain math, and a new modelDrawnScale reproduces the scale a model is drawn at under its pixel floor from the camera pose and viewport, so callers no longer need a Cesium model's computedScale. modelVisualAnchor.js comes off the Cesium allow-list.
This commit is contained in:
1 parent
3cce1aaa3e
commit
eed3b83858
5 files changed
+187
-108
No files matched your search
@@ -545,8 +545,11 @@ export function createMotion({
|
||||
// half-correction put this offset on the lateral axis — see
|
||||
// modelAnchorWorld).
|
||||
return modelAnchorWorld(
|
||||
flightState._trackedModel,
|
||||
flightState._trackedModel.matrix,
|
||||
spec.trailAnchorNative,
|
||||
Number.isFinite(flightState._trackedModel.model.computedScale)
|
||||
? flightState._trackedModel.model.computedScale
|
||||
: spec.scale,
|
||||
flightState._trackedTrailPos,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -407,8 +407,11 @@ export function createMotion({
|
||||
// half-correction put this offset on the lateral axis — see
|
||||
// modelAnchorWorld).
|
||||
return modelAnchorWorld(
|
||||
flightState._trackedModel,
|
||||
flightState._trackedModel.matrix,
|
||||
spec.trailAnchorNative,
|
||||
Number.isFinite(flightState._trackedModel.model.computedScale)
|
||||
? flightState._trackedModel.model.computedScale
|
||||
: spec.scale,
|
||||
flightState._trackedTrailPos,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user