mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
The title logo goes back to live at the starting view
The logo in the title was only a picture. It is now a button, "Back to live at the starting view": the world clock goes live and the camera flies to the view the app started from, letting go of whatever it follows as Reset Globe does. The shell's returnToStart() does it. It flies to the `homeView` option of createApplicationControls, which is the start view unless given: an application that passes `startView` only to carry a view across a rebuild can keep the logo on its own first view. START_VIEW is exported from ./application/controls for that. The title heading keeps "GOD'S EYE VIEW" as its name beside the button.
This commit is contained in:
1 parent
4c90c065be
commit
f5d3521cda
25 files changed
+191
-32
No files matched your search
@@ -631,6 +631,21 @@ test('a globe flight without callbacks still flies (both hooks are optional)', (
|
||||
viewer.flights[0].complete();
|
||||
});
|
||||
|
||||
test('a globe flight to a given view flies there, not out over the current spot', () => {
|
||||
const viewer = stubViewer();
|
||||
const target = flyToGlobeView(viewer, {
|
||||
view: { lon: -82.5, lat: 35, height: 23000000 },
|
||||
});
|
||||
assert.deepEqual(target, { latitude: 35, longitude: -82.5, heightM: 23000000 });
|
||||
const flight = viewer.flights[0];
|
||||
const end = Cesium.Cartographic.fromCartesian(flight.destination);
|
||||
assert.ok(Math.abs(Cesium.Math.toDegrees(end.longitude) + 82.5) < 1e-6);
|
||||
assert.ok(Math.abs(Cesium.Math.toDegrees(end.latitude) - 35) < 1e-6);
|
||||
assert.ok(Math.abs(end.height - 23000000) < 1);
|
||||
assert.equal(flight.orientation.heading, 0);
|
||||
assert.ok(Math.abs(flight.orientation.pitch + Math.PI / 2) < 1e-9);
|
||||
});
|
||||
|
||||
test('geocoded Location branches forward the resolved-navigation ownership hook', () => {
|
||||
const source = fs.readFileSync(new URL('./locations.js', import.meta.url), 'utf8');
|
||||
const searchStart = source.indexOf('export async function searchAndFlyTo');
|
||||
|
||||
Reference in new issue
Block a user