feat: animation expansion

This commit is contained in:
2026-02-25 00:46:45 -05:00
parent 4e14b375e0
commit 998469141a
7 changed files with 1944 additions and 0 deletions

View File

@@ -1232,6 +1232,25 @@ function Animation.keyframes(props)
})
end
--- Link an array of animations into a chain (static helper)
--- Each animation's completion triggers the next in sequence
---@param animations Animation[] Array of animations to chain
---@return Animation first The first animation in the chain
function Animation.chainSequence(animations)
if type(animations) ~= "table" or #animations == 0 then
if Animation._ErrorHandler then
Animation._ErrorHandler:warn("Animation", "ANIM_004")
end
return Animation.new({ duration = 0, start = {}, final = {} })
end
for i = 1, #animations - 1 do
animations[i]:chain(animations[i + 1])
end
return animations[1]
end
-- ============================================================================
-- ANIMATION GROUP (Utility)
-- ============================================================================