mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Let the shell's share link, HUD, orbit and navigation follow another globe engine
The shell reads its viewer, engine and map stack from the attached scene. ShareLinkManager, IntelHUD and OrbitController gain attachEngine, NavigationController setScene and LocationNavigation attachScene/detachScene, so a switch can keep them and move only their camera listeners; between engines they write and read nothing. The voice runner and session voice modules are owned by their packages, which check:boundaries needs since the voice commit.
This commit is contained in:
1 parent
741b6f67eb
commit
d1fdb9eb45
9 files changed
+243
-17
No files matched your search
@@ -443,6 +443,30 @@ export class LocationNavigation {
|
||||
}
|
||||
|
||||
/** Revoke callbacks and settle owned camera work before the viewer is released. */
|
||||
/**
|
||||
* Leave the globe (an engine switch): its reset flight, world-jump
|
||||
* transition and orbit end; the search, its text and the readout stay.
|
||||
*/
|
||||
detachScene() {
|
||||
this._cancelGlobeReset?.();
|
||||
this._cancelGlobeReset = null;
|
||||
if (this._worldJumpActive) this._endWorldJumpTransition();
|
||||
clearTimeout(this._trafficTransitionTimer);
|
||||
this._trafficTransitionTimer = null;
|
||||
this._stopOrbit();
|
||||
this.orbitController?.attachEngine(null);
|
||||
this.viewer = null;
|
||||
this.engine = null;
|
||||
}
|
||||
|
||||
/** Navigate on another globe (an engine switch). */
|
||||
attachScene({ viewer = null, engine = engineFromViewer(viewer) } = {}) {
|
||||
if (this._disposed) return;
|
||||
this.viewer = viewer;
|
||||
this.engine = engine;
|
||||
this.orbitController?.attachEngine(engine);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
if (this._disposed) return;
|
||||
this._disposed = true;
|
||||
|
||||
Reference in new issue
Block a user