Open

Description
import type { TransitionTiming } from "@remotion/transitions";
import { measureSpring, spring, SpringConfig } from "remotion";
const springTimingWithPause = ({
pauseDuration,
}: {
pauseDuration: number;
}): TransitionTiming => {
const firstHalf: Partial = {};
const secondPush: Partial = {
damping: 200,
};
return {
getDurationInFrames: ({ fps }) => { return ( measureSpring({ fps, config: firstHalf }) + measureSpring({ fps, config: secondPush }) + pauseDuration ); }, getProgress({ fps, frame }) { const first = spring({ fps, frame, config: firstHalf }); const second = spring({ fps, frame, config: secondPush, delay: pauseDuration + measureSpring({ fps, config: firstHalf }), });
return first / 2 + second / 2; },
};
};
Originally posted by @pejman-college in 25a956c
Metadata
Metadata
Assignees
Labels
No labels