diff options
Diffstat (limited to 'src/LivingVillage.Desktop/TitleScreen.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/TitleScreen.fs | 6 |
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 |
