packages/docs/docs/effects/evolve.mdx
Part of the @remotion/effects package.
Reveals a canvas-based component from a direction with an optional soft edge.
Use it for wipes, reveals, and intro/outro animations on <Video>, <HtmlInCanvas> and <Solid>.
import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';
import {Video} from '@remotion/media';
import {evolve} from '@remotion/effects/evolve';
export const MyComp: React.FC = () => {
const frame = useCurrentFrame();
const progress = interpolate(frame, [0, 30], [0, 1], {
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
});
return (
<AbsoluteFill>
<Video
src="https://remotion.media/video.mp4"
effects={[
evolve({
progress,
direction: 'left',
feather: 0.18,
}),
]}
/>
</AbsoluteFill>
);
};
Pass an object with the following properties. You can also call evolve() without arguments.
progress?Reveal progress from 0 (fully hidden) to 1 (fully revealed). Defaults to 0.5.
direction?Direction the component is revealed from. Defaults to left.
Possible values: left, right, top, bottom.
feather?Softness of the evolving edge from 0 (sharp edge) to 1 (fully feathered). Defaults to 0.1.
disabled?When true, the effect is skipped. Defaults to false.
evolve() uses a WebGL2 backend. During renders, enable WebGL via Config.setChromiumOpenGlRenderer('angle'). See Using WebGL during renders.