mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Publish the tracked satellite's focus through the renderer ports
The satellites layer publishes its focus rectangle with publishFocusTargetAt, projecting its cached position through the query port and measuring from the camera port's pose, as flights and military already do. The scene-taking publishFocusTargetFromCachedPosition and the unused advanceProjectedSpriteFocus go, and focusDeemphasis.js leaves the Cesium allow-list. The rectangle is the same; the target's frameNumber, which nothing reads, is now -1 as the other layers publish it.
This commit is contained in:
1 parent
b6e94b8d93
commit
d0ca460313
4 files changed
+6
-131
No files matched your search
@@ -48,7 +48,7 @@ export function createRendering({
|
||||
nearFarScalarValueAtDistance,
|
||||
advanceSpriteFocus,
|
||||
focusAlphaNeedsWrite,
|
||||
publishFocusTargetFromCachedPosition,
|
||||
publishFocusTargetAt,
|
||||
} = services.focus;
|
||||
|
||||
const scratchFocusScreen = new Cesium.Cartesian2();
|
||||
@@ -252,11 +252,7 @@ export function createRendering({
|
||||
|
||||
/** Publish the tracked satellite's focus rectangle from its cached position. */
|
||||
function _publishTrackedFocus(target) {
|
||||
publishFocusTargetFromCachedPosition({
|
||||
...target,
|
||||
scene: layerState._viewer?.scene,
|
||||
camera: layerState._viewer?.camera,
|
||||
});
|
||||
publishFocusTargetAt({ ...target, viewer: layerState._viewer });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,7 +78,7 @@ async function fixture(t) {
|
||||
layerState: { isExplicitLayerStateOrigin: () => false },
|
||||
focus: {
|
||||
clearFocusTarget: noop,
|
||||
publishFocusTargetFromCachedPosition: noop,
|
||||
publishFocusTargetAt: noop,
|
||||
getFocusTarget: () => null,
|
||||
},
|
||||
context: {
|
||||
|
||||
Reference in new issue
Block a user