Capítulo 661 de 988

Chapter 661: zoomInOut()

Core Idea

A presentation where the outgoing scene zooms in toward the viewer and crossfades into the incoming scene, which then zooms back out from a magnified state.

Key Concepts

  • Example
  • API
  • Compatibility
  • Credits
  • See also

Code Examples

const Letter: React.FC<{
  children: React.ReactNode;
  color: string;
}> = ({children, color}) => {
  return (
    <AbsoluteFill
      style={{
        backgroundColor: color,
        opacity: 0.9,
        justifyContent: 'center',
        alignItems: 'center',
        fontSize: 200,
        color: 'white',
      }}
    >
      {children}
    </AbsoluteFill>
  );
};

const BasicTransition = () => {
  return (
    <TransitionSeries>
      <TransitionSeries.Sequence durationInFrames={40}>
        <Letter color="#0b84f3">A</Letter>
      </TransitionSeries.Sequence>
      <TransitionSeries.Transition
        presentation={zoomInOut({})}
        timing={linearTiming({durationInFrames: 30})}
      />
      <TransitionSeries.Sequence durationInFrames={60}>
        <Letter color="pink">B</Letter>
      </TransitionSeries.Sequence>
    </TransitionSeries>
  );
};
  • What it demonstrates: Usage pattern for zoomInOut() from the official docs.

Key Takeaways

  1. Understand example when working with zoomInOut().
  2. Understand api when working with zoomInOut().
  3. Understand compatibility when working with zoomInOut().
  4. Understand credits when working with zoomInOut().
  5. Understand see also when working with zoomInOut().

Connects To

  • Audio Transitions: related page in the Transitions (@remotion/transitions) section.
  • Make Html in Canvas Presentation: related page in the Transitions (@remotion/transitions) section.
  • Presentations: related page in the Transitions (@remotion/transitions) section.