Skip to main content

mirror()v4.0.466

Part of the @remotion/effects package.

A mirror effect that can be applied to canvas-based components such as <Video>, <HtmlInCanvas> and <Solid>.

Preview​

Drag current effect onto a layer in the Studio

Example​

MyComp.tsx
import {Video} from '@remotion/media'; import {mirror} from '@remotion/effects/mirror'; export const MyComp: React.FC = () => { return ( <> <Video src="https://remotion.media/video.mp4" effects={[ mirror({ direction: 'horizontal', position: 0.5, }), ]} /> </> ); };

API​

Pass an object with the following properties.

direction?​

Mirror direction. Defaults to 'horizontal'.

  • 'horizontal' mirrors left and right. The position is interpreted on the X axis.
  • 'vertical' mirrors top and bottom. The position is interpreted on the Y axis.

position?​

Mirror position in UV coordinates from 0 to 1. Defaults to 0.5.

invert?​

When true, mirrors the other side of the image. Defaults to false.

disabled?​

When true, the effect is skipped. Defaults to false.

Requirements​

mirror() uses a WebGL2 backend. See Using WebGL and WebGPU during renders.

See also​