diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-26 04:04:30 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-26 04:04:30 +0200 |
| commit | 0b7597b31fa956c7f3d4838923b545ba5e341422 (patch) | |
| tree | 6b360add6e4e22a422736bc9ddccdf13097bd044 /apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts | |
| parent | 6a22a3ecbdff2d0e6a4c24c8db40bb86bc01b692 (diff) | |
| download | opencut-0b7597b31fa956c7f3d4838923b545ba5e341422.tar.gz | |
refactor: split animation helpers by domain
Diffstat (limited to 'apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts')
| -rw-r--r-- | apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts b/apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts index b0b6f01a..18e027c7 100644 --- a/apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts +++ b/apps/web/src/components/editor/panels/properties/hooks/use-keyframed-param-property.ts @@ -3,16 +3,18 @@ import { useEditor } from "@/editor/use-editor"; import { buildGraphicParamPath, - coerceAnimationValueForParam, getKeyframeAtTime, - getParamDefaultInterpolation, - getParamValueKind, hasKeyframesForPath, upsertPathKeyframe, } from "@/animation"; import type { ElementAnimations, } from "@/animation/types"; +import { + coerceAnimationParamValue, + getAnimationParamDefaultInterpolation, + getAnimationParamValueKind, +} from "@/animation/animated-params"; import type { ParamDefinition } from "@/params"; import type { TimelineElement } from "@/timeline"; @@ -79,12 +81,12 @@ export function useKeyframedParamProperty({ propertyPath, time: localTime, value, - kind: getParamValueKind({ param }), - defaultInterpolation: getParamDefaultInterpolation({ + kind: getAnimationParamValueKind({ param }), + defaultInterpolation: getAnimationParamDefaultInterpolation({ param, }), coerceValue: ({ value: nextValue }) => - coerceAnimationValueForParam({ + coerceAnimationParamValue({ param, value: nextValue, }), |
