mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Take the camera layer's policy, state, model and ground off Cesium
The layer's colours are renderer colours; the parts that still draw with Cesium (icons, coverage lines, the monitor plane) turn them into Cesium colours with the adapter's own conversion. The screen and matrix scratches are plain objects, which is all the projections that fill them write. The model part converts angles with geo/vector, reads where the eye is from the camera port's pose, and builds the monitor plane's orientation with geo/quaternion from the same axes; the projection part hands the entity a Cesium quaternion of it. The photoreal tileset readiness check, which looks through the scene's primitives, moves to the geometry part. The ground pass moves a camera icon by writing geo/ellipsoid's position into the record's own position object. The test plane's plain material comes from the projection part, and the selection part only lost an unused import. All give the same numbers as the Cesium calls they replace. Policy, state, selection, testing, model and ground leave the allow-list.
This commit is contained in:
1 parent
2592289612
commit
7d760d32fc
13 files changed
+147
-127
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import * as Cesium from 'cesium';
|
||||
|
||||
export function createState({ services }) {
|
||||
const {
|
||||
clearOverlaySource,
|
||||
@@ -76,11 +74,13 @@ export function createState({ services }) {
|
||||
|
||||
layerState._activeFocusStyleCount = 0;
|
||||
|
||||
layerState._scratchFocusScreen = new Cesium.Cartesian2();
|
||||
// Screen-point scratches: the projections that fill them write only x and y.
|
||||
layerState._scratchFocusScreen = { x: 0, y: 0 };
|
||||
|
||||
layerState._scratchViewScreen = new Cesium.Cartesian2();
|
||||
layerState._scratchViewScreen = { x: 0, y: 0 };
|
||||
|
||||
layerState._scratchViewProjection = new Cesium.Matrix4();
|
||||
/** The view pass's view-projection matrix, column-major. */
|
||||
layerState._scratchViewProjection = new Float64Array(16);
|
||||
|
||||
// Counts view passes; a record shown by the latest pass carries its number.
|
||||
|
||||
|
||||
Reference in new issue
Block a user