mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-24 04:02:19 +00:00
The app opens with the logo turning into the globe over your country
When the world has loaded, the loading screen's words fade and the logo glides to the centre. The eye's arcs fly at the viewer, the drawn planet in the pupil gives way to the real globe drawn the same size behind it, and the globe spins west to east, growing and slowing until it stops with the whole planet in view over the visitor's country. The country comes from the browser's time zone (or, for UTC, a language's region), so nothing leaves the browser. scripts/build-home-countries.mjs writes the zone and country table from tzdata's zone.tab and the Natural Earth countries pack. The title's logo goes back to the same view. A share link, a Stories link, reduced motion and ?intro=0 open as before. A click, a key or the wheel skips to the end; any other camera move stops it. The globe-in-view recovery waits while it plays, since the far start shows the globe as a speck.
This commit is contained in:
1 parent
e51853de3d
commit
f5b2867752
13 files changed
+1480
-4
No files matched your search
@@ -1,6 +1,9 @@
|
||||
import { initFirstRunExperience } from '../firstRunExperience.js';
|
||||
|
||||
/** Reveal welcome controls only after restoration and the loading transition. */
|
||||
/**
|
||||
* Reveal welcome controls only after restoration and the loading transition.
|
||||
* `playOpening` plays the opening on a bare address (src/app/openingIntro.js).
|
||||
*/
|
||||
export function startApplicationChrome({
|
||||
loadingScreen,
|
||||
styleManager,
|
||||
@@ -8,9 +11,11 @@ export function startApplicationChrome({
|
||||
signal,
|
||||
initializeWelcome = initFirstRunExperience,
|
||||
initializeSettings,
|
||||
playOpening = null,
|
||||
}) {
|
||||
let disposed = false;
|
||||
let firstRun;
|
||||
let opening = null;
|
||||
let revealTimer;
|
||||
let resolveDelay;
|
||||
const minimumDelay = new Promise((resolve) => {
|
||||
@@ -29,6 +34,14 @@ export function startApplicationChrome({
|
||||
})
|
||||
.then(() => {
|
||||
if (disposed || signal.aborted) return;
|
||||
// A bare address opens with the opening; welcome waits for its end.
|
||||
opening = styleManager.hasShareState
|
||||
? null
|
||||
: playOpening?.({ viewer: styleManager.viewer, loadingScreen });
|
||||
if (opening) {
|
||||
void opening.done.then(revealFirstRun);
|
||||
return;
|
||||
}
|
||||
loadingScreen.classList.add('hidden');
|
||||
loadingScreen.addEventListener('transitionend', revealFirstRun, {
|
||||
once: true,
|
||||
@@ -44,6 +57,7 @@ export function startApplicationChrome({
|
||||
);
|
||||
return async () => {
|
||||
disposed = true;
|
||||
opening?.cancel();
|
||||
clearTimeout(delayTimer);
|
||||
clearTimeout(revealTimer);
|
||||
resolveDelay();
|
||||
|
||||
Reference in new issue
Block a user