summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop.Tests
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.Tests
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.Tests')
-rw-r--r--src/LivingVillage.Desktop.Tests/PrototypeTests.fs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs
index 450e94b..5a40868 100644
--- a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs
+++ b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs
@@ -728,6 +728,15 @@ type PrototypeTests () =
Assert.AreEqual<float32>(1.0f, (atHour 0).LanternGlow)
[<TestMethod>]
+ member _.TitleEntranceProgressIsDeterministicAndCompleteAfterTwoSeconds () =
+ // 120 frames at the fixed 60Hz step = 2s entrance, pure function of frame count.
+ Assert.AreEqual<float32>(1.0f, TitleScreen.entranceProgress 0L)
+ Assert.AreEqual<float32>(0.5f, TitleScreen.entranceProgress 60L)
+ Assert.AreEqual<float32>(0.0f, TitleScreen.entranceProgress 120L)
+ Assert.AreEqual<float32>(0.0f, TitleScreen.entranceProgress 1000L)
+ Assert.AreEqual<float32>(TitleScreen.entranceProgress 37L, TitleScreen.entranceProgress 37L)
+
+ [<TestMethod>]
member _.WorldPanelDoesNotRenderA永久KeyList () =
let world = Sim.initialWorldN 42UL 0
let lines = M5Interaction.panelLines world M5Interaction.initial