From 3849252be9ee5a6b9ad6b31b0fe1a19767621baa Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 21 Sep 2026 13:18:35 +0800 Subject: feat(desktop): 标题画面两秒确定性入场动画 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit entranceProgress 纯函数按帧计数(固定 60Hz 步长,禁实时时钟):黛瓦天际线自上 36px 落定、标题自下 24px 升起、水面带 2s 淡入、灯笼/面板同步;快照回归断言进度锚点(0/60/120/超时)与确定性;LV_AUTOPLAY_FLOW 标题停留 60 帧可直接采样入场过程。 --- src/LivingVillage.Desktop/TitleScreen.fs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/LivingVillage.Desktop/TitleScreen.fs') 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 -- cgit v1.2.3