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:
Sameh Khamis committed 2026-11-17 19:48:46 -08:00
1 parent 4c90c065be
commit f5d3521cda
25 files changed
+191 -32

No files matched your search

+8
View File
@@ -8,6 +8,9 @@ import { useDisplayStore } from '../ui/stores/display.js';
import { applicationPinia } from '../ui/vueRuntime.js';
import { t } from '../i18n/index.js';
/** Where the camera starts unless a host gives a `startView`. */
export { START_VIEW };
/**
* Construct the existing controls and camera presentation. `initialShareCode`
* opens a share code (the `<code>` of `/share/<code>`) at start-up, for a host
@@ -15,6 +18,9 @@ import { t } from '../i18n/index.js';
* picker, for a host that offers its own language choice (`switchLocale` from
* the `./i18n` entry). `startView` is where the camera starts (the whole
* planet by default; a host may pass a city); a shared view flies from there.
* `homeView` is where the title's logo goes back to (with the clock live): the
* start view unless given, for a host whose `startView` only carries a view
* across a rebuild.
* `services.cockpitSubjects` adds the application's own first-person subjects
* to the Cockpit (src/cockpitSubjectProviders.js).
*/
@@ -29,6 +35,7 @@ export function createApplicationControls({
initialShareCode = null,
localePicker = true,
startView = START_VIEW,
homeView = startView,
}) {
// Every boot starts from the same view, before share restoration flies on.
applyStartView(viewer, startView);
@@ -51,6 +58,7 @@ export function createApplicationControls({
// A share code to open at start-up instead of the page's address.
initialShareCode,
localePicker,
homeView,
});
defer(() => styleManager.orbitController.stop());
defer(() => styleManager.hud.destroy());