Skip to main content

crossZoom()v4.0.467

A presentation where both scenes zoom across a moving center with weighted blur samples.

warning

This presentation is built with HTML-in-canvas and requires Google Chrome with chrome://flags/#canvas-draw-element enabled. It does not work in Firefox or Safari.

Example​

CrossZoomTransition.tsx
import {linearTiming, TransitionSeries} from '@remotion/transitions'; import {crossZoom} from '@remotion/transitions/cross-zoom'; const BasicTransition = () => { return ( <TransitionSeries> <TransitionSeries.Sequence durationInFrames={40}> <Letter color="#0b84f3">A</Letter> </TransitionSeries.Sequence> <TransitionSeries.Transition presentation={crossZoom({strength: 0.4})} timing={linearTiming({durationInFrames: 30})} /> <TransitionSeries.Sequence durationInFrames={60}> <Letter color="pink">B</Letter> </TransitionSeries.Sequence> </TransitionSeries> ); };

API​

Accepts an object with the following options:

strength?​

Controls the zoom blur amount. Higher values increase blur and motion around the moving center.

Defaults to 0.4.

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

For Preview, Chrome with the chrome://flags/#canvas-draw-element flag enabled is required.

Credits​

The fragment shader is adapted from the CrossZoom GL Transition by rectalogic (ported by gre), licensed under MIT.

See also​