🎥 Make videos programmatically with React
add CameraMotionBlur to the example playground
Jonny Burger905e0de849fe
diff --git a/packages/example/package.json b/packages/example/package.jsonindex e72f684263..2fcb8825cf 100644--- a/packages/example/package.json+++ b/packages/example/package.json@@ -37,6 +37,7 @@"@remotion/lambda": "workspace:*","@remotion/lottie": "workspace:*","@remotion/media-utils": "workspace:*",+ "@remotion/motion-blur": "workspace:*","@remotion/paths": "workspace:*","@remotion/renderer": "workspace:*","@remotion/rive": "workspace:*",diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsxindex 0769a96496..b51ad5b8e1 100644--- a/packages/example/src/Video.tsx+++ b/packages/example/src/Video.tsx@@ -38,7 +38,7 @@ import {VideoOnCanvas} from './VideoOnCanvas';import {Greenscreen} from './VideoOnCanvas/greenscreen';import {VideoSpeed} from './VideoSpeed';import {VideoTesting} from './VideoTesting';-import {WarpDemo} from './WarpText';+import {WarpDemoOuter} from './WarpText';import {WarpDemo2} from './WarpText/demo2';if (alias !== 'alias') {@@ -555,7 +555,7 @@ export const Index: React.FC = () => {/><Compositionid="path-warp"- component={WarpDemo}+ component={WarpDemoOuter}durationInFrames={500}fps={30}height={1080}diff --git a/packages/example/src/WarpText/index.tsx b/packages/example/src/WarpText/index.tsxindex e956ec22df..9a706a35b0 100644--- a/packages/example/src/WarpText/index.tsx+++ b/packages/example/src/WarpText/index.tsx@@ -1,5 +1,7 @@+import {CameraMotionBlur} from '@remotion/motion-blur';+import {getBoundingBox, resetPath, warpPath, WarpPathFn} from '@remotion/paths';import opentype from 'opentype.js';-import {useEffect, useRef, useState} from 'react';+import React, {useEffect, useRef, useState} from 'react';import {AbsoluteFill,spring,@@ -8,8 +10,6 @@ import {useVideoConfig,} from 'remotion';-import {getBoundingBox, resetPath, warpPath, WarpPathFn} from '@remotion/paths';-type FontInfo = {path: string;};@@ -84,7 +84,6 @@ export const WarpDemo = () => {return (<AbsoluteFillstyle={{- backgroundColor: 'white',justifyContent: 'center',alignItems: 'center',}}@@ -104,3 +103,22 @@ export const WarpDemo = () => {</AbsoluteFill>);};++export const WarpDemoOuter: React.FC = () => {+ return (+ <div+ style={{+ width: '100%',+ height: '100%',+ background: 'white',+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <CameraMotionBlur samples={5} shutterAngle={180}>+ <WarpDemo />+ </CameraMotionBlur>+ </div>+ );+};diff --git a/packages/example/tsconfig.json b/packages/example/tsconfig.jsonindex c3d04eb5d0..d4a0abb8e2 100644--- a/packages/example/tsconfig.json+++ b/packages/example/tsconfig.json@@ -16,6 +16,7 @@{"path": "../media-utils"},{"path": "../babel-loader"},{"path": "../three"},- {"path": "../rive"}+ {"path": "../rive"},+ {"path": "../motion-blur"}]}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex fab776cde0..f8efe35a85 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -494,6 +494,7 @@ importers:'@remotion/lambda': workspace:*'@remotion/lottie': workspace:*'@remotion/media-utils': workspace:*+ '@remotion/motion-blur': workspace:*'@remotion/paths': workspace:*'@remotion/renderer': workspace:*'@remotion/rive': workspace:*@@ -544,6 +545,7 @@ importers:'@remotion/lambda': link:../lambda'@remotion/lottie': link:../lottie'@remotion/media-utils': link:../media-utils+ '@remotion/motion-blur': link:../motion-blur'@remotion/paths': link:../paths'@remotion/renderer': link:../renderer'@remotion/rive': link:../rive