You can already reverse a spring function:
const spr: Partial<SpringConfig> = {
damping: 200,
};
const duration = measureSpring({fps, config});
const two = spring({
fps,
frame: duration - frame,
config,
});
But (even for me) it requires quite some mental gymnastics to figure that out.
Bounty
- Should implement a
reverse parameter for spring() that takes care of this calculation (default false)
- Important: Take into account the
durationInFrames option!
- Should document in spring.md and label as available in the next Remotion version using
<AvailableFrom>
- Write 1-2 unit test assertions
You can already reverse a spring function:
But (even for me) it requires quite some mental gymnastics to figure that out.
Bounty
reverseparameter for spring() that takes care of this calculation (defaultfalse)durationInFramesoption!<AvailableFrom>