summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/TitleScreen.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 13:18:35 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 13:18:35 +0800
commit3849252be9ee5a6b9ad6b31b0fe1a19767621baa (patch)
tree2a865e28cafa03e0b8f229baa88f5117f31db75c /src/LivingVillage.Desktop/TitleScreen.fs
parentbe8c9eacb884faf22299edb24955e1084be2747f (diff)
downloadliving-village-3849252be9ee5a6b9ad6b31b0fe1a19767621baa.tar.gz
feat(desktop): 标题画面两秒确定性入场动画
entranceProgress 纯函数按帧计数(固定 60Hz 步长,禁实时时钟):黛瓦天际线自上 36px 落定、标题自下 24px 升起、水面带 2s 淡入、灯笼/面板同步;快照回归断言进度锚点(0/60/120/超时)与确定性;LV_AUTOPLAY_FLOW 标题停留 60 帧可直接采样入场过程。
Diffstat (limited to 'src/LivingVillage.Desktop/TitleScreen.fs')
-rw-r--r--src/LivingVillage.Desktop/TitleScreen.fs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/TitleScreen.fs b/src/LivingVillage.Desktop/TitleScreen.fs
index c05e472..0dcd693 100644
--- a/src/LivingVillage.Desktop/TitleScreen.fs
+++ b/src/LivingVillage.Desktop/TitleScreen.fs
@@ -82,6 +82,12 @@ module TitleScreen =
let waterSlot = waterTileSlot
let roofSlots = roofRidgeSlot, roofEaveSlot
+ /// Deterministic 2s entrance at the fixed 60Hz step: 1.0 = elements fully parked
+ /// off-screen at start, 0.0 = settled. Pure function of the frame counter.
+ let entranceProgress (frameCount: int64) : float32 =
+ if frameCount >= 120L then 0.0f
+ else 1.0f - float32 frameCount / 120.0f
+
let layout (viewportWidth: int) (viewportHeight: int) : TitleLayout =
let width = max 320 viewportWidth
let height = max 240 viewportHeight