Transitions
Cut from one scene to the next with fades, slides, wipes, flips and shader transitions.
TransitionSeries plays scenes one after another and puts a transition between them. Each transition is a presentation, such as fade(), with a timing that sets its length.
import { TransitionSeries, linearTiming } from '@kinetographdev/core/transitions';
import { fade } from '@kinetographdev/core/transitions/fade';
import { slide } from '@kinetographdev/core/transitions/slide';
import { SceneA, SceneB, SceneC } from './scenes';
export const Show = () => (
<TransitionSeries>
<TransitionSeries.Sequence durationInFrames={60}>
<SceneA />
</TransitionSeries.Sequence>
<TransitionSeries.Transition presentation={fade()} timing={linearTiming({ durationInFrames: 20 })} />
<TransitionSeries.Sequence durationInFrames={60}>
<SceneB />
</TransitionSeries.Sequence>
<TransitionSeries.Transition presentation={slide({ direction: 'from-right' })} timing={linearTiming({ durationInFrames: 15 })} />
<TransitionSeries.Sequence durationInFrames={60}>
<SceneC />
</TransitionSeries.Sequence>
</TransitionSeries>
);A transition overlaps the two scenes around it for its length, so the video is shorter than the sum of the scenes by the sum of the transitions.
Presentations
Import each presentation from @kinetographdev/core/transitions/<name>.
fade,none,slide,wipe,flip,irisandclockWipetake a few options, such asdirection.- Shader transitions:
blurSlide,bookFlip,crossZoom,crosswarp,dissolve,dreamyZoom,filmBurn,linearBlur,pushCut,ripple,swap,zoomBlurandzoomInOut.
Timing is linearTiming({ durationInFrames, easing }) or springTiming({ config }), which lasts until the spring settles.
Moving things with a transition
useTransitionProgress() runs inside a scene and returns entering and exiting, each from 0 to 1 as the scene comes in and goes out.
Rules
- A
Sequencetakesoffsetto leave a gap (positive) or overlap the scene before it (negative). TransitionSeries.Overlayputs a layer over a cut, such as a light leak.
Suggested prompt
/kinetograph-markupJoin my three scenes with a 15 frame slide and then a dissolve, and check the overlap with a strip.
What works
- Drawn natively: every presentation above, linear and spring timing,
OverlayanduseTransitionProgress. - Approximated: nothing is listed as approximated. A transition is a shader, or layers with opacity, transforms and clips.
- Not supported: nothing. Every export of
@remotion/transitionsexists. - See What works and Migrate from Remotion.