Strengthen subtle animations: pin scale-pops, window slide-in/out with overshoot, panel slides, zButton cascade, zBar springy stagger

This commit is contained in:
DuvelCorp
2026-09-10 17:21:10 +02:00
parent 66ff1ae711
commit 3233ebff7f
5 changed files with 61 additions and 15 deletions
+11 -2
View File
@@ -35,7 +35,12 @@ local function MTH_Map_AnimatePin(pin)
if not MTH_MAP_Sauce or not pin then return end
if type(MTH_FX_IsEnabled) == "function" and not MTH_FX_IsEnabled("ui.mappins") then return end
if type(pin.SetAlpha) == "function" then pin:SetAlpha(0) end
MTH_MAP_Sauce:FadeIn(pin, 0.3)
-- Bouncy scale "pop": the pin overshoots its size and springs back while
-- fading in. Far more eye-catching than a plain alpha fade.
MTH_MAP_Sauce:Group({
MTH_MAP_Sauce:FadeIn(pin, 0.20, "outQuad", { defer = true }),
MTH_MAP_Sauce:Rubber(pin, 0.35, 0.55, { defer = true }),
})
end
-- Ping a minimap pin that just came into range. Only called for genuinely new
@@ -44,7 +49,11 @@ local function MTH_Map_PingMinimapPin(pin)
if not MTH_MAP_Sauce or not pin then return end
if type(MTH_FX_IsEnabled) == "function" and not MTH_FX_IsEnabled("ui.minimapping") then return end
if type(pin.SetAlpha) == "function" then pin:SetAlpha(0) end
MTH_MAP_Sauce:FadeIn(pin, 0.35)
-- Springy grow-in so a freshly-discovered node clearly "pops" onto the minimap.
MTH_MAP_Sauce:Group({
MTH_MAP_Sauce:FadeIn(pin, 0.20, "outQuad", { defer = true }),
MTH_MAP_Sauce:Rubber(pin, 0.30, 0.55, { defer = true }),
})
end
local MTH_MAP_MINIMAP_ZOOM = {