mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Follow on the Cesium camera port
The Cesium camera port follows a target with Cesium's own entity tracking, on a hidden helper entity per target, and gains followed, followFramed, followOffset and followChanged. A target with a minimum range gets GEV's close-range rules, moved here from trackedCamera.js: an exact first framing, no zoom coasting, a zoom floor, and an eye that never crosses through the target. followChanged now fires only when what is followed changes, on the stub too. No layer follows through the port yet.
This commit is contained in:
1 parent
21d23034ec
commit
6c215f93a9
13 files changed
+690
-66
No files matched your search
@@ -140,6 +140,16 @@ export function webglContext(scene) {
|
||||
return scene?.context?._gl;
|
||||
}
|
||||
|
||||
/**
|
||||
* The entity Cesium's EntityView tracks: set once tracking has started and
|
||||
* framed its entity, which can be frames after `trackedEntity` is set.
|
||||
* @param {object} widget Viewer or CesiumWidget.
|
||||
* @returns {object|null} Entity.
|
||||
*/
|
||||
export function trackedEntityViewEntity(widget) {
|
||||
return (widget?._cesiumWidget ?? widget)?._entityView?.entity ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a camera flight is under way. Cesium clears it before calling a
|
||||
* flight's `complete`, so it reads false inside that callback.
|
||||
|
||||
Reference in new issue
Block a user