feat(ui): 优化加载界面动画效果
- 将原有的旋转圆环加载动画替换为三点脉冲动画 - 调整加载文字字号从14px增大到16px,提高可读性 - 重构HTML结构,新增loading-container包裹元素 - 修改状态文本样式,增加字体粗细和间距调整 - 删除旧的spin关键帧动画定义 - 更新JavaScript轮播文案逻辑,使用取模运算循环显示提示语 - 增加APP_STATE.namasteStableFrames变量重置逻辑 - 调整加载文案切换间隔时间从600ms延长至800ms
This commit is contained in:
93
me.html
93
me.html
@@ -65,46 +65,65 @@
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
letter-spacing: 8px;
|
letter-spacing: 8px;
|
||||||
color: var(--loader-text);
|
color: var(--loader-text);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 30px;
|
||||||
animation: breathe 3s infinite;
|
animation: breathe 3s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loader-ring {
|
/* 加载容器样式 */
|
||||||
width: 50px;
|
.loading-container {
|
||||||
height: 50px;
|
text-align: center;
|
||||||
border: 2px solid rgba(128, 128, 128, 0.2);
|
min-height: 80px;
|
||||||
border-top-color: var(--accent-color);
|
display: flex;
|
||||||
border-radius: 50%;
|
flex-direction: column;
|
||||||
animation: spin 1s linear infinite;
|
justify-content: center;
|
||||||
margin-bottom: 20px;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-text {
|
.status-text {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
color: var(--loader-text);
|
color: var(--loader-text);
|
||||||
opacity: 0.8;
|
opacity: 0.9;
|
||||||
height: 20px;
|
height: 24px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
.perm-hint {
|
/* 加载动画点 */
|
||||||
margin-top: 30px;
|
.loading-dots {
|
||||||
padding: 10px 20px;
|
display: flex;
|
||||||
border: 1px solid var(--accent-color);
|
justify-content: center;
|
||||||
border-radius: 20px;
|
align-items: center;
|
||||||
font-size: 12px;
|
|
||||||
color: var(--loader-text);
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(10px);
|
|
||||||
transition: all 1s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.perm-hint.show {
|
.dot {
|
||||||
opacity: 1;
|
width: 8px;
|
||||||
transform: translateY(0);
|
height: 8px;
|
||||||
|
background-color: var(--accent-color);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin: 0 4px;
|
||||||
|
animation: dot-pulse 1.5s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot:nth-child(2) {
|
||||||
|
animation-delay: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot:nth-child(3) {
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes dot-pulse {
|
||||||
|
0%, 60%, 100% {
|
||||||
|
transform: translateY(0);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
transform: translateY(-8px);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 进入按钮样式 */
|
|
||||||
.enter-container {
|
.enter-container {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -338,12 +357,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes gradientShift {
|
@keyframes gradientShift {
|
||||||
0% {
|
0% {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
@@ -430,8 +443,14 @@
|
|||||||
<!-- 1. 智能加载层 -->
|
<!-- 1. 智能加载层 -->
|
||||||
<div id="start-screen">
|
<div id="start-screen">
|
||||||
<div class="logo-text">Honesty</div>
|
<div class="logo-text">Honesty</div>
|
||||||
<div class="loader-ring"></div>
|
<div class="loading-container">
|
||||||
<div class="status-text" id="loader-msg">正在唤醒灵感...</div>
|
<div class="status-text" id="loader-msg">正在唤醒灵感...</div>
|
||||||
|
<div class="loading-dots">
|
||||||
|
<span class="dot"></span>
|
||||||
|
<span class="dot"></span>
|
||||||
|
<span class="dot"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="enter-container" id="enter-container" style="margin-top: 30px; text-align: center; opacity: 0; transition: opacity 1s;">
|
<div class="enter-container" id="enter-container" style="margin-top: 30px; text-align: center; opacity: 0; transition: opacity 1s;">
|
||||||
<div class="countdown-hint" id="countdown-hint" style="font-size: 14px; margin-bottom: 15px; color: var(--loader-text);">5秒后自动进入</div>
|
<div class="countdown-hint" id="countdown-hint" style="font-size: 14px; margin-bottom: 15px; color: var(--loader-text);">5秒后自动进入</div>
|
||||||
<button class="enter-btn" id="enter-btn" style="padding: 12px 24px; background: transparent; border: 1px solid var(--accent-color); color: var(--loader-text); border-radius: 30px; cursor: pointer; font-size: 14px; letter-spacing: 2px;">立即进入</button>
|
<button class="enter-btn" id="enter-btn" style="padding: 12px 24px; background: transparent; border: 1px solid var(--accent-color); color: var(--loader-text); border-radius: 30px; cursor: pointer; font-size: 14px; letter-spacing: 2px;">立即进入</button>
|
||||||
@@ -984,6 +1003,7 @@
|
|||||||
window.exitArchive = function () {
|
window.exitArchive = function () {
|
||||||
APP_STATE.mode = 'LOCKED';
|
APP_STATE.mode = 'LOCKED';
|
||||||
APP_STATE.exitCooldownUntil = Date.now() + 2000;
|
APP_STATE.exitCooldownUntil = Date.now() + 2000;
|
||||||
|
APP_STATE.namasteStableFrames = 0; // 清空手势识别进度
|
||||||
|
|
||||||
DOM_CACHE.mainHint.style.display = 'block';
|
DOM_CACHE.mainHint.style.display = 'block';
|
||||||
DOM_CACHE.subHint.style.display = 'block';
|
DOM_CACHE.subHint.style.display = 'block';
|
||||||
@@ -1158,15 +1178,14 @@
|
|||||||
|
|
||||||
// 循环播放加载文案
|
// 循环播放加载文案
|
||||||
let loadIdx = 0;
|
let loadIdx = 0;
|
||||||
const maxIdx = CONTENT.load.length - 1;
|
|
||||||
const loadTimer = setInterval(() => {
|
const loadTimer = setInterval(() => {
|
||||||
if (APP_STATE.isLoaded) {
|
if (APP_STATE.isLoaded) {
|
||||||
clearInterval(loadTimer);
|
clearInterval(loadTimer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
safeUpdateText(DOM_CACHE.loaderMsg, CONTENT.load[loadIdx > maxIdx ? maxIdx : loadIdx]);
|
safeUpdateText(DOM_CACHE.loaderMsg, CONTENT.load[loadIdx % CONTENT.load.length]);
|
||||||
loadIdx++;
|
loadIdx++;
|
||||||
}, 600);
|
}, 800);
|
||||||
|
|
||||||
// 资源加载完成后显示进入按钮
|
// 资源加载完成后显示进入按钮
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user