Add loading overlay while scenes initialize
- Show a spinner overlay that fades out once Cesium globe data is ready, with a 1s minimum and 8s timeout - Expose a ready promise on CesiumGlobe resolved after country and city data load - Remove temporary inspect script
This commit is contained in:
@@ -52,6 +52,29 @@ html, body {
|
||||
background: #0c0906; opacity: 0; transition: opacity 0.18s ease;
|
||||
}
|
||||
|
||||
/* 加载界面 */
|
||||
#loading {
|
||||
position: fixed; inset: 0; z-index: 1000;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
background: #14100d;
|
||||
transition: opacity 0.6s ease;
|
||||
}
|
||||
#loading.hidden { opacity: 0; pointer-events: none; }
|
||||
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 18px; }
|
||||
.spinner {
|
||||
width: 54px; height: 54px;
|
||||
border: 3px solid rgba(201, 162, 39, 0.22);
|
||||
border-top-color: #c9a227;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.9s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.loading-text {
|
||||
font-family: var(--serif);
|
||||
font-size: 14px; letter-spacing: 0.3em;
|
||||
color: rgba(230, 216, 182, 0.7);
|
||||
}
|
||||
|
||||
/* 顶部标题 */
|
||||
.hud { position: absolute; z-index: 5; }
|
||||
.top-left { top: 22px; left: 26px; }
|
||||
|
||||
Reference in New Issue
Block a user