diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-06 12:59:07 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-06 12:59:07 +0200 |
| commit | c411edb7c160c55e94fddf62fd60fa1e166351c0 (patch) | |
| tree | 39495bfc8120590c93943a396cce2b477d3faa6c /apps/web/src/lib/animation/target-resolver.ts | |
| parent | 2776adaae1512bf925c5bb4564b311b37f46202d (diff) | |
| download | opencut-c411edb7c160c55e94fddf62fd60fa1e166351c0.tar.gz | |
fix: clean up
Diffstat (limited to 'apps/web/src/lib/animation/target-resolver.ts')
| -rw-r--r-- | apps/web/src/lib/animation/target-resolver.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/web/src/lib/animation/target-resolver.ts b/apps/web/src/lib/animation/target-resolver.ts index 06c9e140..64bb8709 100644 --- a/apps/web/src/lib/animation/target-resolver.ts +++ b/apps/web/src/lib/animation/target-resolver.ts @@ -32,9 +32,9 @@ export interface AnimationPathDescriptor { kind: AnimationBindingKind; defaultInterpolation: AnimationInterpolation; numericRanges?: Partial<Record<string, NumericSpec>>; - coerceValue(value: AnimationValue): AnimationValue | null; - getBaseValue(): AnimationValue | null; - setBaseValue(value: AnimationValue): TimelineElement; + coerceValue: ({ value }: { value: AnimationValue }) => AnimationValue | null; + getBaseValue: () => AnimationValue | null; + setBaseValue: ({ value }: { value: AnimationValue }) => TimelineElement; } export function getParamValueKind({ @@ -135,9 +135,9 @@ function buildGraphicParamDescriptor({ kind: getParamValueKind({ param }), defaultInterpolation: getParamDefaultInterpolation({ param }), numericRanges: getParamNumericRange({ param }), - coerceValue: (value) => coerceAnimationValueForParam({ param, value }), + coerceValue: ({ value }) => coerceAnimationValueForParam({ param, value }), getBaseValue: () => element.params[param.key] ?? param.default, - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = coerceAnimationValueForParam({ param, value }); if (coercedValue === null) { return element; @@ -183,9 +183,9 @@ function buildEffectParamDescriptor({ kind: getParamValueKind({ param }), defaultInterpolation: getParamDefaultInterpolation({ param }), numericRanges: getParamNumericRange({ param }), - coerceValue: (value) => coerceAnimationValueForParam({ param, value }), + coerceValue: ({ value }) => coerceAnimationValueForParam({ param, value }), getBaseValue: () => effect.params[param.key] ?? param.default, - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = coerceAnimationValueForParam({ param, value }); if (coercedValue === null) { return element; @@ -239,7 +239,7 @@ export function resolveAnimationTarget({ kind: propertyDefinition.kind, defaultInterpolation: propertyDefinition.defaultInterpolation, numericRanges: propertyDefinition.numericRanges, - coerceValue: (value) => + coerceValue: ({ value }) => coerceAnimationValueForProperty({ propertyPath: path, value, @@ -249,7 +249,7 @@ export function resolveAnimationTarget({ element, propertyPath: path, }), - setBaseValue: (value) => { + setBaseValue: ({ value }) => { const coercedValue = propertyDefinition.coerceValue({ value }); if (coercedValue === null) { return element; |
