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,16 +1,16 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { isHeadingEstimated } from './headingConfidence.js';
|
||||
import {
|
||||
ACTIVE_CAMERA_COLOR,
|
||||
ACTIVE_CAMERA_COLOR as ACTIVE_CAMERA_RGBA,
|
||||
CAMERA_ICON,
|
||||
IDLE_CAMERA_COLOR,
|
||||
LIVE_CAMERA_COLOR,
|
||||
ACTIVE_COVERAGE_CENTER,
|
||||
IDLE_COVERAGE_CENTER_MUTED,
|
||||
ACTIVE_COVERAGE_CENTER_DEPTHFAIL,
|
||||
ACTIVE_COVERAGE_EDGE,
|
||||
IDLE_COVERAGE_EDGE_MUTED,
|
||||
ACTIVE_COVERAGE_EDGE_DEPTHFAIL,
|
||||
IDLE_CAMERA_COLOR as IDLE_CAMERA_RGBA,
|
||||
LIVE_CAMERA_COLOR as LIVE_CAMERA_RGBA,
|
||||
ACTIVE_COVERAGE_CENTER as ACTIVE_COVERAGE_CENTER_RGBA,
|
||||
IDLE_COVERAGE_CENTER_MUTED as IDLE_COVERAGE_CENTER_MUTED_RGBA,
|
||||
ACTIVE_COVERAGE_CENTER_DEPTHFAIL as ACTIVE_COVERAGE_CENTER_DEPTHFAIL_RGBA,
|
||||
ACTIVE_COVERAGE_EDGE as ACTIVE_COVERAGE_EDGE_RGBA,
|
||||
IDLE_COVERAGE_EDGE_MUTED as IDLE_COVERAGE_EDGE_MUTED_RGBA,
|
||||
ACTIVE_COVERAGE_EDGE_DEPTHFAIL as ACTIVE_COVERAGE_EDGE_DEPTHFAIL_RGBA,
|
||||
VIEW_CELL_PX,
|
||||
VIEW_ICON_MARGIN,
|
||||
VIEW_MIN_CELL_M,
|
||||
@@ -19,6 +19,22 @@ import { createIconSet } from '../../data/iconSet.js';
|
||||
import { writeHoldSegment } from '../../data/iconSegment.js';
|
||||
import { IconSetPrimitive } from '../../data/iconSetPrimitive.js';
|
||||
import { iconAtlas } from '../../data/iconAtlas.js';
|
||||
import { toColor } from '../../render/cesium/draw.js';
|
||||
|
||||
// The policy's renderer colours as the Cesium colours the icons and lines take.
|
||||
const ACTIVE_CAMERA_COLOR = toColor(ACTIVE_CAMERA_RGBA);
|
||||
const IDLE_CAMERA_COLOR = toColor(IDLE_CAMERA_RGBA);
|
||||
const LIVE_CAMERA_COLOR = toColor(LIVE_CAMERA_RGBA);
|
||||
const ACTIVE_COVERAGE_CENTER = toColor(ACTIVE_COVERAGE_CENTER_RGBA);
|
||||
const IDLE_COVERAGE_CENTER_MUTED = toColor(IDLE_COVERAGE_CENTER_MUTED_RGBA);
|
||||
const ACTIVE_COVERAGE_CENTER_DEPTHFAIL = toColor(
|
||||
ACTIVE_COVERAGE_CENTER_DEPTHFAIL_RGBA,
|
||||
);
|
||||
const ACTIVE_COVERAGE_EDGE = toColor(ACTIVE_COVERAGE_EDGE_RGBA);
|
||||
const IDLE_COVERAGE_EDGE_MUTED = toColor(IDLE_COVERAGE_EDGE_MUTED_RGBA);
|
||||
const ACTIVE_COVERAGE_EDGE_DEPTHFAIL = toColor(
|
||||
ACTIVE_COVERAGE_EDGE_DEPTHFAIL_RGBA,
|
||||
);
|
||||
|
||||
/** The camera icon's drawn size (px). */
|
||||
const CAMERA_ICON_PX = 24;
|
||||
|
||||
Reference in new issue
Block a user