summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/animation/resolve.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/lib/animation/resolve.ts')
-rw-r--r--apps/web/src/lib/animation/resolve.ts18
1 files changed, 18 insertions, 0 deletions
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,