Skip to content

ew2 #2135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tiggerianer opened this issue Apr 9, 2025 · 0 comments
Open

ew2 #2135

Tiggerianer opened this issue Apr 9, 2025 · 0 comments

Comments

@Tiggerianer
Copy link

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

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

No branches or pull requests

1 participant