From a526066b61f18b082adf6faeaf3e19f3d13cd77d Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Mon, 2 Mar 2026 16:36:10 +0100 Subject: feat: wire ui to have keyframes for: opacity, text color, and all background properties --- apps/web/src/lib/animation/resolve.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'apps/web/src/lib/animation/resolve.ts') diff --git a/apps/web/src/lib/animation/resolve.ts b/apps/web/src/lib/animation/resolve.ts index 450ae983..147be1b3 100644 --- a/apps/web/src/lib/animation/resolve.ts +++ b/apps/web/src/lib/animation/resolve.ts @@ -92,6 +92,24 @@ export function resolveOpacityAtTime({ }); } +export function resolveNumberAtTime({ + baseValue, + animations, + propertyPath, + localTime, +}: { + baseValue: number; + animations: ElementAnimations | undefined; + propertyPath: AnimationPropertyPath; + localTime: number; +}): number { + return getNumberChannelValueAtTime({ + channel: getNumberChannelForPath({ animations, propertyPath }), + time: Math.max(0, localTime), + fallbackValue: baseValue, + }); +} + export function resolveColorAtTime({ baseColor, animations, -- cgit v1.3.1