v0.13: 性能重构+数值平衡+字体资源落地

性能(调研 7-A 落地):
- 新增 AnimatedNumber 组件(useRef + rAF lerp,60fps 平滑过渡,不触发 React re-render)
- CrystalOrb 拆 OrbStats 子组件:主体(Canvas+button)不再每 tick 重渲染
  crystals/crystalCap/crystalsPerSec 订阅下沉到 OrbStats,用 AnimatedNumber 平滑
- page.tsx StatsPanel: shallow → useShallow(修复 zustand v5 getSnapshot 崩溃)

数值平衡(调研 7-A 落地,防速通):
- 新增 src/lib/game/softcap.ts:applySoftcap/applyCostSoftcap/effectiveDecodedForPrestige
- 飞升蓝图公式改 sqrt softcap(阈值 40,power 0.5)
  前 2 蓝图照常给(新手友好),3-6 蓝图需更多解码(防速通)
  - totalDecoded=40 → 2 蓝图(与旧一致)
  - totalDecoded=80 → 2 蓝图(旧=4)
  - totalDecoded=360 → 6 蓝图(封顶)

非商用资源落地(调研 7-B):
- 安装 @fontsource/share-tech-mono + @fontsource/vt323(SIL OFL 自托管)
- globals.css 加 --font-tech / --font-terminal 变量
- ResourceBar 数值用 font-tech(Share Tech Mono 星舰仪表盘感)
- ArchaeoLogTicker 文本用 font-terminal(VT323 终端绿字)+ GiScrollUnfurled 图标
- 安装 react-icons,引入 game-icons.net 子集(MIT)

交互优化:
- ExpeditionPanel 加探险目的说明(3 资源卡片)+ 节点类型图例(issue #3 反馈)
- BeaconPanel 布局微调

验证:
- lint 零错误
- VLM 首页 QA 8.5/10(字体/配色/页脚贴底均良好)
- 点击脉冲交互正常(数值增加、浮动数字正确消失)
- dev.log 无运行时错误
This commit is contained in:
2026-06-24 04:02:45 +00:00
parent cfc87ca3a1
commit 93195f9b88
14 changed files with 287 additions and 170 deletions
+3
View File
@@ -1,5 +1,8 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono, Orbitron } from "next/font/google";
// v0.13 调研 7-B 落地:自托管科幻/终端字体(SIL OFL,可商用)
import "@fontsource/share-tech-mono"; // 科技等宽 → 数据/坐标显示
import "@fontsource/vt323"; // 终端绿字风 → 脉冲低语/考古日志
import "./globals.css";
import { Toaster } from "@/components/ui/toaster";