Skip to content

Fix split clip losing keyframe interpolation on right half#123

Open
PriyeshPandey2000 wants to merge 1 commit into
palmier-io:mainfrom
PriyeshPandey2000:fix/split-keyframe-interpolation
Open

Fix split clip losing keyframe interpolation on right half#123
PriyeshPandey2000 wants to merge 1 commit into
palmier-io:mainfrom
PriyeshPandey2000:fix/split-keyframe-interpolation

Conversation

@PriyeshPandey2000

@PriyeshPandey2000 PriyeshPandey2000 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

When splitting a clip between two keyframes, splitKeyframeTrack inserts a boundary keyframe at offset 0 of the right half. That keyframe defaulted to .smooth interpolation regardless of the preceding segment. A .hold segment incorrectly animates on the right half; a .linear segment incorrectly eases instead of continuing linearly. Fix looks up the preceding keyframe's interpolationOut and passes it to the inserted boundary keyframe.


Note

Low Risk
Small, localized change to split keyframe logic with new unit tests; no auth, persistence, or API surface changes.

Overview
Fixes incorrect animation on the right half of a split when the cut falls between keyframes. splitKeyframeTrack still inserts a boundary keyframe at frame 0 on the right track, but that keyframe now uses the interpolationOut of the last keyframe before the split (falling back to .smooth) instead of always defaulting to smooth easing.

That keeps hold segments flat until the next keyframe and linear ramps continuing at a constant rate after the cut. Regression tests cover opacity (hold) and rotation (linear) via splitClip + sample(at:).

Reviewed by Cursor Bugbot for commit da5007d. Bugbot is set up for automated code reviews on this repo. Configure here.

When splitting a clip between two keyframes, the boundary keyframe
inserted at offset 0 of the right half always defaulted to .smooth
interpolation. A .hold segment incorrectly animates on the right half;
a .linear segment incorrectly eases instead of continuing linearly.
Fix inherits interpolationOut from the preceding keyframe.
@PriyeshPandey2000 PriyeshPandey2000 force-pushed the fix/split-keyframe-interpolation branch from 5e0c95c to da5007d Compare June 25, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant