mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 11:12:18 +00:00
fix(globe): tighten the Cesium engine after review
Map sources are applied through one src/maps/sceneApply.js helper shared by MapSourceController and engine.maps (live layer kept for an unchanged provider, providers cached per source). The contract gains flyTo endTransform and rectangle destinations, flyToSphere easing, drillPick width/height and pick content, with Cesium's own flyToSphere range. Input skips listeners removed during dispatch and stays inert after destroy.
This commit is contained in:
1 parent
d831cbd23a
commit
ab2368f3f3
18 files changed
+658
-117
No files matched your search
@@ -1,13 +1,18 @@
|
||||
// GlobePicker on a Cesium scene. Pick results keep Cesium's `id` and
|
||||
// `primitive`; the untouched Cesium result rides along as `object` for
|
||||
// Cesium-only callers.
|
||||
// GlobePicker on a Cesium scene. Pick results keep Cesium's `id`,
|
||||
// `primitive` and `content` (3D tile content, read by surface-pick checks);
|
||||
// the untouched Cesium result rides along as `object` for Cesium-only callers.
|
||||
|
||||
import { toCesium2, toGeo3 } from './convert.js';
|
||||
|
||||
const normalise = (picked) =>
|
||||
picked == null
|
||||
? undefined
|
||||
: { id: picked.id, primitive: picked.primitive, object: picked };
|
||||
: {
|
||||
id: picked.id,
|
||||
primitive: picked.primitive,
|
||||
content: picked.content,
|
||||
object: picked,
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Cesium.Viewer} viewer
|
||||
@@ -19,8 +24,10 @@ export function createCesiumPicker(viewer) {
|
||||
pick(screen, width, height) {
|
||||
return normalise(scene.pick(toCesium2(screen), width, height));
|
||||
},
|
||||
drillPick(screen, limit) {
|
||||
return scene.drillPick(toCesium2(screen), limit).map(normalise);
|
||||
drillPick(screen, limit, width, height) {
|
||||
return scene
|
||||
.drillPick(toCesium2(screen), limit, width, height)
|
||||
.map(normalise);
|
||||
},
|
||||
pickPosition(screen) {
|
||||
if (!scene.pickPositionSupported) return undefined;
|
||||
|
||||
Reference in new issue
Block a user