mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Move the scene-reading icon orientation helpers into the Cesium adapter
screenProjectedRotation, perspectiveProjectedRotation, horizonOccluder and cameraPoseSignature read a Cesium scene or camera, so they move unchanged to src/render/cesium/iconOrientation.js, where the CCTV, radio and transit rendering (still Cesium-bound) load them. src/data/iconOrientation.js keeps the label backdrop test and the rotation deadband, and leaves the Cesium allow-list. Local ADS-B computes its rotation from the camera port's axes with courseScreenRotation directly, the same answer without a stand-in scene. The ./aircraft package entry re-exports src/data/iconOrientation.js, so it no longer carries the four moved helpers or the PERSPECTIVE_* constants.
This commit is contained in:
1 parent
d8d6db4389
commit
b6e94b8d93
14 files changed
+224
-206
No files matched your search
@@ -3,11 +3,13 @@ import assert from 'node:assert/strict';
|
||||
import * as Cesium from 'cesium';
|
||||
import {
|
||||
HORIZON_FEATHER_RAD,
|
||||
horizonOccluder,
|
||||
screenProjectedRotation,
|
||||
skyBackdropFactor,
|
||||
stabilizeScreenRotation,
|
||||
} from './iconOrientation.js';
|
||||
import {
|
||||
horizonOccluder,
|
||||
screenProjectedRotation,
|
||||
} from '../render/cesium/iconOrientation.js';
|
||||
|
||||
const equatorPosition = Cesium.Cartesian3.fromDegrees(0, 0, 0);
|
||||
|
||||
@@ -563,7 +565,7 @@ import {
|
||||
PERSPECTIVE_BLEND_MIN_PX,
|
||||
PERSPECTIVE_PROBE_M,
|
||||
perspectiveProjectedRotation,
|
||||
} from './iconOrientation.js';
|
||||
} from '../render/cesium/iconOrientation.js';
|
||||
|
||||
/**
|
||||
* A scene the exact projector accepts: 3D mode, a canvas, and a camera with a
|
||||
|
||||
Reference in new issue
Block a user