Skip to content

🎥 Make videos programmatically with React

replace logo

Jonny Burger4abee9350205
diff --git a/packages/template-react-router/app/home.tsx b/packages/template-react-router/app/home.tsx
index 85da44f4f4..0bbd0de7b3 100644
--- a/packages/template-react-router/app/home.tsx
+++ b/packages/template-react-router/app/home.tsx
@@ -2,7 +2,6 @@ import { Player } from "@remotion/player";
import React, { useCallback, useMemo, useState } from "react";
import { RenderProgress } from "./components/render-progress";
import { renderVideo } from "./lib/render-video.server";
-import type { LogoAnimationProps } from "./remotion/constants";
import {
SITE_NAME,
COMPOSITION_DURATION_IN_FRAMES,
@@ -10,11 +9,13 @@ import {
COMPOSITION_HEIGHT,
COMPOSITION_ID,
COMPOSITION_WIDTH,
+ CompositionProps,
} from "./remotion/constants";
-import { LogoAnimation } from "./remotion/logo-animation";
import stylesHref from "./styles/layout.css?url";
import type { RenderResponse } from "./lib/types";
import { ActionFunction, LinksFunction, useFetcher } from "react-router";
+import { z } from "zod";
+import { Main } from "./remotion/components/Main";
export const links: LinksFunction = () => {
return [{ rel: "stylesheet", href: stylesHref }];
@@ -45,16 +46,16 @@ const playerStyle: React.CSSProperties = {
export const action: ActionFunction = async ({ request }) => {
const formData = await request.formData();
- const personalizedName = formData.get("personalizedName") as string;
+ const title = formData.get("title") as string;
- if (!personalizedName) {
+ if (!title) {
throw new Response(JSON.stringify({ error: "No name entered" }), {
status: 400,
});
}
- const inputProps: LogoAnimationProps = {
- personalizedName,
+ const inputProps: z.infer<typeof CompositionProps> = {
+ title: title,
};
const renderData = await renderVideo({
@@ -66,15 +67,13 @@ export const action: ActionFunction = async ({ request }) => {
});
return renderData;
-
-}
+};
export default function Index() {
- const [personalizedName, setPersonalizedName] = useState("you");
+ const [title, settitle] = useState("React Router + Remotion");
const fetcher = useFetcher<RenderResponse>();
const onNameChange = useCallback(
- (e: React.ChangeEvent<HTMLInputElement>) =>
- setPersonalizedName(e.target.value),
+ (e: React.ChangeEvent<HTMLInputElement>) => settitle(e.target.value),
[],
);
@@ -82,21 +81,21 @@ export default function Index() {
(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
e.preventDefault();
const data = new FormData();
- data.append("personalizedName", personalizedName);
+ data.append("title", title);
fetcher.submit(data, { method: "post" });
},
- [fetcher, personalizedName],
+ [fetcher, title],
);
- const inputProps: LogoAnimationProps = useMemo(() => {
- return { personalizedName };
- }, [personalizedName]);
+ const inputProps: z.infer<typeof CompositionProps> = useMemo(() => {
+ return { title };
+ }, [title]);
return (
<div style={container} className="container">
<div style={playerContainer}>
<Player
- component={LogoAnimation}
+ component={Main}
inputProps={inputProps}
durationInFrames={COMPOSITION_DURATION_IN_FRAMES}
fps={COMPOSITION_FPS}
@@ -120,11 +119,7 @@ export default function Index() {
<div>
<p>Enter your name for a custom video:</p>
<fetcher.Form method="post">
- <input
- type="text"
- onChange={onNameChange}
- value={personalizedName}
- />
+ <input type="text" onChange={onNameChange} value={title} />
<br></br>
<button type="submit" onClick={onClick}>
Render a video
diff --git a/packages/template-react-router/app/lib/render-video.server.ts b/packages/template-react-router/app/lib/render-video.server.ts
index 37d9beaf2c..50a0cc91cf 100644
--- a/packages/template-react-router/app/lib/render-video.server.ts
+++ b/packages/template-react-router/app/lib/render-video.server.ts
@@ -4,12 +4,8 @@ import {
speculateFunctionName,
} from "@remotion/lambda/client";
import type { RenderResponse } from "./types";
-import {
- DISK,
- RAM,
- TIMEOUT,
- type LogoAnimationProps,
-} from "app/remotion/constants";
+import { CompositionProps, DISK, RAM, TIMEOUT } from "app/remotion/constants";
+import { z } from "zod";
export const renderVideo = async ({
serveUrl,
@@ -20,7 +16,7 @@ export const renderVideo = async ({
}: {
serveUrl: string;
composition: string;
- inputProps: LogoAnimationProps;
+ inputProps: z.infer<typeof CompositionProps>;
outName: string;
metadata: Record<string, string> | null;
}): Promise<RenderResponse> => {
diff --git a/packages/template-react-router/app/remotion/Root.tsx b/packages/template-react-router/app/remotion/Root.tsx
index 7eb124ea2e..c813e33091 100644
--- a/packages/template-react-router/app/remotion/Root.tsx
+++ b/packages/template-react-router/app/remotion/Root.tsx
@@ -6,19 +6,19 @@ import {
COMPOSITION_ID,
COMPOSITION_WIDTH,
} from "./constants";
-import { LogoAnimation } from "./logo-animation";
+import { Main } from "./components/Main";
export const RemotionRoot = () => {
return (
<>
<Composition
id={COMPOSITION_ID}
- component={LogoAnimation}
+ component={Main}
durationInFrames={COMPOSITION_DURATION_IN_FRAMES}
fps={COMPOSITION_FPS}
width={COMPOSITION_WIDTH}
height={COMPOSITION_HEIGHT}
- defaultProps={{ personalizedName: "stranger" }}
+ defaultProps={{ title: "stranger" }}
/>
</>
);
diff --git a/packages/template-react-router/app/remotion/components/Main.tsx b/packages/template-react-router/app/remotion/components/Main.tsx
new file mode 100644
index 0000000000..807a323f60
--- /dev/null
+++ b/packages/template-react-router/app/remotion/components/Main.tsx
@@ -0,0 +1,63 @@
+import { z } from "zod";
+import {
+ AbsoluteFill,
+ Sequence,
+ spring,
+ useCurrentFrame,
+ useVideoConfig,
+} from "remotion";
+import { ReactRouterLogo } from "./ReactRouterLogo";
+import { loadFont, fontFamily } from "@remotion/google-fonts/Inter";
+import React, { useMemo } from "react";
+import { Rings } from "./Rings";
+import { TextFade } from "./TextFade";
+import { CompositionProps } from "../constants";
+
+loadFont();
+
+const container: React.CSSProperties = {
+ backgroundColor: "white",
+};
+
+const logo: React.CSSProperties = {
+ justifyContent: "center",
+ alignItems: "center",
+};
+
+export const Main = ({ title }: z.infer<typeof CompositionProps>) => {
+ const frame = useCurrentFrame();
+ const { fps } = useVideoConfig();
+
+ const transitionStart = 2 * fps;
+ const transitionDuration = 1 * fps;
+
+ const logoOut = spring({
+ fps,
+ frame,
+ config: {
+ damping: 200,
+ },
+ durationInFrames: transitionDuration,
+ delay: transitionStart,
+ });
+
+ const titleStyle: React.CSSProperties = useMemo(() => {
+ return { fontFamily, fontSize: 70 };
+ }, []);
+
+ return (
+ <AbsoluteFill style={container}>
+ <Sequence durationInFrames={transitionStart + transitionDuration}>
+ <Rings outProgress={logoOut}></Rings>
+ <AbsoluteFill style={logo}>
+ <ReactRouterLogo outProgress={logoOut}></ReactRouterLogo>
+ </AbsoluteFill>
+ </Sequence>
+ <Sequence from={transitionStart + transitionDuration / 2}>
+ <TextFade>
+ <h1 style={titleStyle}>{title}</h1>
+ </TextFade>
+ </Sequence>
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/template-react-router/app/remotion/components/ReactRouterLogo.tsx b/packages/template-react-router/app/remotion/components/ReactRouterLogo.tsx
new file mode 100644
index 0000000000..3ab371917e
--- /dev/null
+++ b/packages/template-react-router/app/remotion/components/ReactRouterLogo.tsx
@@ -0,0 +1,75 @@
+import React, { useMemo } from "react";
+import {
+ Easing,
+ interpolate,
+ spring,
+ useCurrentFrame,
+ useVideoConfig,
+} from "remotion";
+
+export const ReactRouterLogo: React.FC<{
+ outProgress: number;
+}> = ({ outProgress }) => {
+ const { fps } = useVideoConfig();
+ const frame = useCurrentFrame();
+
+ const style: React.CSSProperties = useMemo(() => {
+ return {
+ height: 250,
+ scale: String(1 - outProgress),
+ };
+ }, [outProgress]);
+
+ const scaleIn = (delay: number): React.CSSProperties => ({
+ scale: spring({
+ fps,
+ frame,
+ config: {
+ damping: 200,
+ },
+ delay,
+ }),
+ });
+
+ const fadeIn = (delay: number): React.CSSProperties => ({
+ opacity: interpolate(frame, [delay, delay + 30], [0, 1], {
+ extrapolateRight: "clamp",
+ extrapolateLeft: "clamp",
+ easing: Easing.in(Easing.ease),
+ }),
+ });
+
+ return (
+ <svg
+ width="800px"
+ height="800px"
+ viewBox="0 -58 256 256"
+ version="1.1"
+ preserveAspectRatio="xMidYMid"
+ style={style}
+ >
+ <g>
+ <path
+ style={scaleIn(0)}
+ d="M78.0659341,92.5875806 C90.8837956,92.5875806 101.274726,82.1966508 101.274726,69.3787894 C101.274726,56.5609279 90.8837956,46.1699982 78.0659341,46.1699982 C65.2480726,46.1699982 54.8571429,56.5609279 54.8571429,69.3787894 C54.8571429,82.1966508 65.2480726,92.5875806 78.0659341,92.5875806 Z"
+ fill="#000000"
+ />
+ <path
+ style={scaleIn(4)}
+ d="M23.2087913,139.005163 C36.0266526,139.005163 46.4175825,128.614233 46.4175825,115.796372 C46.4175825,102.97851 36.0266526,92.5875806 23.2087913,92.5875806 C10.3909298,92.5875806 0,102.97851 0,115.796372 C0,128.614233 10.3909298,139.005163 23.2087913,139.005163 Z"
+ fill="#000000"
+ />
+ <path
+ style={scaleIn(8)}
+ d="M232.791209,139.005163 C245.60907,139.005163 256,128.614233 256,115.796372 C256,102.97851 245.60907,92.5875806 232.791209,92.5875806 C219.973347,92.5875806 209.582418,102.97851 209.582418,115.796372 C209.582418,128.614233 219.973347,139.005163 232.791209,139.005163 Z"
+ fill="#000000"
+ />
+ <path
+ style={fadeIn(25)}
+ d="M156.565464,70.3568084 C155.823426,62.6028163 155.445577,56.1490255 149.505494,51.6131676 C141.982638,45.8687002 133.461166,49.5960243 122.964463,45.8072968 C112.650326,43.3121427 105,34.1545727 105,23.2394367 C105,10.4046502 115.577888,0 128.626373,0 C138.29063,0 146.599638,5.70747659 150.259573,13.8825477 C155.861013,24.5221258 152.220489,35.3500418 159.258242,40.8041273 C167.591489,47.2621895 178.826167,42.5329154 191.362109,48.6517412 C195.390112,50.5026944 198.799584,53.4384578 201.202056,57.0769224 C203.604528,60.7153869 205,65.0565524 205,69.7183101 C205,80.633446 197.349674,89.7910161 187.035538,92.2861702 C176.538834,96.0748977 168.017363,92.3475736 160.494506,98.092041 C152.03503,104.551712 156.563892,115.358642 149.669352,126.774447 C145.756163,134.291567 137.802119,139.43662 128.626373,139.43662 C115.577888,139.43662 105,129.03197 105,116.197184 C105,106.873668 110.581887,98.832521 118.637891,95.1306146 C131.173833,89.0117889 142.408511,93.7410629 150.741758,87.2830007 C155.549106,83.5574243 156.565464,77.8102648 156.565464,70.3568084 Z"
+ fill="#D0021B"
+ />
+ </g>
+ </svg>
+ );
+};
diff --git a/packages/template-react-router/app/remotion/components/Rings.tsx b/packages/template-react-router/app/remotion/components/Rings.tsx
new file mode 100644
index 0000000000..c886f4460f
--- /dev/null
+++ b/packages/template-react-router/app/remotion/components/Rings.tsx
@@ -0,0 +1,58 @@
+import React from "react";
+import { AbsoluteFill, interpolateColors, useVideoConfig } from "remotion";
+
+const RadialGradient: React.FC<{
+ radius: number;
+ color: string;
+}> = ({ radius, color }) => {
+ const height = radius * 2;
+ const width = radius * 2;
+
+ return (
+ <AbsoluteFill
+ style={{
+ justifyContent: "center",
+ alignItems: "center",
+ }}
+ >
+ <div
+ style={{
+ height,
+ width,
+ borderRadius: "50%",
+ backgroundColor: color,
+ position: "absolute",
+ boxShadow: "0 0 100px rgba(0, 0, 0, 0.05)",
+ }}
+ ></div>
+ </AbsoluteFill>
+ );
+};
+
+export const Rings: React.FC<{
+ outProgress: number;
+}> = ({ outProgress }) => {
+ const scale = 1 / (1 - outProgress);
+ const { height } = useVideoConfig();
+
+ return (
+ <AbsoluteFill
+ style={{
+ transform: `scale(${scale})`,
+ }}
+ >
+ {new Array(5)
+ .fill(true)
+ .map((_, i) => {
+ return (
+ <RadialGradient
+ key={i}
+ radius={height * 0.3 * i}
+ color={interpolateColors(i, [0, 4], ["#fff", "#fff"])}
+ />
+ );
+ })
+ .reverse()}
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/template-react-router/app/remotion/components/TextFade.tsx b/packages/template-react-router/app/remotion/components/TextFade.tsx
new file mode 100644
index 0000000000..a9a0891aaa
--- /dev/null
+++ b/packages/template-react-router/app/remotion/components/TextFade.tsx
@@ -0,0 +1,54 @@
+import React, { useMemo } from "react";
+import {
+ AbsoluteFill,
+ interpolate,
+ spring,
+ useCurrentFrame,
+ useVideoConfig,
+} from "remotion";
+
+const outer: React.CSSProperties = {};
+
+export const TextFade: React.FC<{
+ children: React.ReactNode;
+}> = ({ children }) => {
+ const { fps } = useVideoConfig();
+ const frame = useCurrentFrame();
+
+ const progress = spring({
+ fps,
+ frame,
+ config: {
+ damping: 200,
+ },
+ durationInFrames: 80,
+ });
+
+ const rightStop = interpolate(progress, [0, 1], [200, 0]);
+
+ const leftStop = Math.max(0, rightStop - 60);
+
+ const maskImage = `linear-gradient(-45deg, transparent ${leftStop}%, black ${rightStop}%)`;
+
+ const container: React.CSSProperties = useMemo(() => {
+ return {
+ justifyContent: "center",
+ alignItems: "center",
+ };
+ }, []);
+
+ const content: React.CSSProperties = useMemo(() => {
+ return {
+ maskImage,
+ WebkitMaskImage: maskImage,
+ };
+ }, [maskImage]);
+
+ return (
+ <AbsoluteFill style={outer}>
+ <AbsoluteFill style={container}>
+ <div style={content}>{children}</div>
+ </AbsoluteFill>
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/template-react-router/app/remotion/components/logo-animation-sequence.tsx b/packages/template-react-router/app/remotion/components/logo-animation-sequence.tsx
deleted file mode 100644
index 775c398960..0000000000
--- a/packages/template-react-router/app/remotion/components/logo-animation-sequence.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import {
- AbsoluteFill,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { PlusSymbol } from "./plus-symbol";
-import { GlowingR } from "./remix-logo/glowing-r";
-import { RemixPersonToFusion } from "./remix-logo/remix-person-to-fusion";
-import { RemotionLogo } from "./remotion-logo/remotion-logo";
-import { RemotionPersonToFusion } from "./remotion-logo/remotion-person-to-fusion";
-
-export const LogoAnimationSequence = () => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
-
- const logoScale = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- return (
- <AbsoluteFill
- style={{
- backgroundColor: "white",
- }}
- >
- <AbsoluteFill
- style={{
- transform: `scale(${1 - logoScale})`,
- }}
- >
- <RemixPersonToFusion horizontalOffset={180} progressOverride={1} />
- <PlusSymbol />
- <RemotionPersonToFusion horizontalOffset={0} progressOverride={1} />
- </AbsoluteFill>
- <AbsoluteFill
- style={{
- transform: `scale(${logoScale})`,
- }}
- >
- <RemotionLogo size={1200} />
- <AbsoluteFill
- style={{
- display: "flex",
- justifyContent: "center",
- alignItems: "center",
- marginLeft: -40,
- transform: "scale(0.8)",
- }}
- >
- <GlowingR />
- </AbsoluteFill>
- </AbsoluteFill>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/personalized-name.tsx b/packages/template-react-router/app/remotion/components/personalized-name.tsx
deleted file mode 100644
index d8c8c0eeab..0000000000
--- a/packages/template-react-router/app/remotion/components/personalized-name.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import type { LogoAnimationProps } from "../constants";
-
-export const PersonalizedName = ({ personalizedName }: LogoAnimationProps) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
- const progress = spring({
- fps,
- frame: frame - 15,
- config: {
- damping: 200,
- },
- });
-
- const opacity = interpolate(progress, [0, 1], [1, 0]);
-
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- justifyContent: "center",
- alignItems: "center",
- opacity,
- }}
- >
- <span
- style={{
- fontSize: 100,
- color: "black",
- fontFamily: "Founders Grotesk,sans-serif",
- fontWeight: 700,
- }}
- >
- {`Hey ${personalizedName}! `}
- </span>
- <span
- style={{
- fontSize: 100,
- color: "black",
- fontFamily: "Founders Grotesk,sans-serif",
- fontWeight: 700,
- }}
- >
- This is a personalized video for you.
- </span>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/plus-symbol.tsx b/packages/template-react-router/app/remotion/components/plus-symbol.tsx
deleted file mode 100644
index 69446ae8da..0000000000
--- a/packages/template-react-router/app/remotion/components/plus-symbol.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-interface Props {
- verticalOffset?: number;
-}
-
-export const PlusSymbol = ({ verticalOffset = 0 }: Props) => {
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- alignItems: "center",
- top: `calc(42% + ${verticalOffset}px)`,
- }}
- >
- <span
- style={{
- fontSize: 130,
- fontFamily: "sans-serif",
- }}
- >
- +
- </span>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/glowing-r.tsx b/packages/template-react-router/app/remotion/components/remix-logo/glowing-r.tsx
deleted file mode 100644
index 4fb4736e2c..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/glowing-r.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-export const GlowingR = () => {
- return (
- <svg
- width="800"
- height="800"
- viewBox="0 0 800 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <g filter="url(#filter0_dd_126_53)">
- <path
- fillRule="evenodd"
- clipRule="evenodd"
- d="M587.947 527.768C592.201 582.418 592.201 608.036 592.201 636H465.756C465.756 629.909 465.865 624.337 465.975 618.687C466.317 601.123 466.674 582.807 463.828 545.819C460.067 491.667 436.748 479.634 393.871 479.634H355.883H195V381.109H399.889C454.049 381.109 481.13 364.633 481.13 321.011C481.13 282.654 454.049 259.41 399.889 259.41H195V163H422.456C545.069 163 606 220.912 606 313.42C606 382.613 563.123 427.739 505.201 435.26C554.096 445.037 582.681 472.865 587.947 527.768Z"
- fill="#E8F2FF"
- />
- <path
- d="M195 636V562.553H328.697C351.029 562.553 355.878 579.116 355.878 588.994V636H195Z"
- fill="#E8F2FF"
- />
- </g>
- <defs>
- <filter
- id="filter0_dd_126_53"
- x="131"
- y="99"
- width="539"
- height="601"
- filterUnits="userSpaceOnUse"
- colorInterpolationFilters="sRGB"
- >
- <feFlood floodOpacity="0" result="BackgroundImageFix" />
- <feColorMatrix
- in="SourceAlpha"
- type="matrix"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- result="hardAlpha"
- />
- <feOffset />
- <feGaussianBlur stdDeviation="28" />
- <feComposite in2="hardAlpha" operator="out" />
- <feColorMatrix
- type="matrix"
- values="0 0 0 0 0.223529 0 0 0 0 0.572549 0 0 0 0 1 0 0 0 1 0"
- />
- <feBlend
- mode="normal"
- in2="BackgroundImageFix"
- result="effect1_dropShadow_126_53"
- />
- <feColorMatrix
- in="SourceAlpha"
- type="matrix"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- result="hardAlpha"
- />
- <feOffset />
- <feGaussianBlur stdDeviation="32" />
- <feComposite in2="hardAlpha" operator="out" />
- <feColorMatrix
- type="matrix"
- values="0 0 0 0 0.223529 0 0 0 0 0.572549 0 0 0 0 1 0 0 0 0.9 0"
- />
- <feBlend
- mode="normal"
- in2="effect1_dropShadow_126_53"
- result="effect2_dropShadow_126_53"
- />
- <feBlend
- mode="normal"
- in="SourceGraphic"
- in2="effect2_dropShadow_126_53"
- result="shape"
- />
- </filter>
- </defs>
- </svg>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/r.tsx b/packages/template-react-router/app/remotion/components/remix-logo/r.tsx
deleted file mode 100644
index 0c981ea1c0..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/r.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-export const R = () => {
- return (
- <div
- style={{
- transform: "scale(0.2)",
- transformOrigin: "top left",
- marginLeft: -42,
- marginTop: -32,
- }}
- >
- <svg
- width="800"
- height="800"
- viewBox="0 0 800 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <rect width="800" height="800" fill="white" />
- <path
- fillRule="evenodd"
- clipRule="evenodd"
- d="M587.947 527.768C592.201 582.418 592.201 608.036 592.201 636H465.756C465.756 629.909 465.865 624.337 465.975 618.687C466.317 601.123 466.674 582.807 463.828 545.819C460.067 491.667 436.748 479.634 393.871 479.634H355.883H195V381.109H399.889C454.049 381.109 481.13 364.633 481.13 321.011C481.13 282.654 454.049 259.41 399.889 259.41H195V163H422.456C545.069 163 606 220.912 606 313.42C606 382.613 563.123 427.739 505.201 435.26C554.096 445.037 582.681 472.865 587.947 527.768Z"
- fill="#121212"
- />
- <path
- d="M195 636V562.553H328.697C351.029 562.553 355.878 579.116 355.878 588.994V636H195Z"
- fill="#121212"
- />
- </svg>
- </div>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/remix-letter.tsx b/packages/template-react-router/app/remotion/components/remix-logo/remix-letter.tsx
deleted file mode 100644
index af0c8d9f2a..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/remix-letter.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import { R } from "./r";
-
-interface Props {
- letterValue: string;
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const RemixLetter = ({
- letterValue,
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <div
- style={{
- position: "absolute",
- left: marginLeft,
- top: marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- transformOrigin: "center",
- }}
- >
- {letterValue === "R" ? (
- <R />
- ) : (
- <span
- style={{
- fontSize: 130,
- color: "black",
- fontFamily: "Founders Grotesk,sans-serif",
- fontWeight: 700,
- }}
- >
- {letterValue}
- </span>
- )}
- </div>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/remix-line-to-person.tsx b/packages/template-react-router/app/remotion/components/remix-logo/remix-line-to-person.tsx
deleted file mode 100644
index 5b3cbccc5f..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/remix-line-to-person.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { RemixLetter } from "./remix-letter";
-
-interface Props {
- horizontalOffset?: number;
-}
-
-export const RemixLineToPerson = ({ horizontalOffset }: Props) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
-
- const progress = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- const rHorizontalPosition = interpolate(progress, [0, 1], [0, 320]);
-
- const xHorizontalPosition = interpolate(progress, [0, 1], [290, 324]);
- const xVerticalPosition = interpolate(progress, [0, 1], [411, 324]);
-
- const iHorizontalPosition = interpolate(progress, [0, 1], [257, 320]);
- const iVerticalPosition = interpolate(progress, [0, 1], [411, 255]);
- const iRotation = interpolate(progress, [0, 1], [0, 90]);
-
- const eHorizontalPosition = interpolate(progress, [0, 1], [82, 320]);
- const eVerticalPosition = interpolate(progress, [0, 1], [411, 220]);
-
- const mHorizontalPosition = interpolate(progress, [0, 1], [148, 210]);
- const mVerticalPosition = interpolate(progress, [0, 1], [410, 208]);
- const mRotation = interpolate(progress, [0, 1], [0, 90]);
-
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(1)",
- }}
- >
- <RemixLetter
- letterValue="R"
- marginLeft={rHorizontalPosition}
- marginTop={411}
- />
- <RemixLetter
- letterValue="e"
- marginLeft={eHorizontalPosition}
- marginTop={eVerticalPosition}
- />
- <RemixLetter
- letterValue="m"
- marginLeft={mHorizontalPosition}
- marginTop={mVerticalPosition}
- rotation={mRotation}
- />
- <RemixLetter
- letterValue="i"
- marginLeft={iHorizontalPosition}
- marginTop={iVerticalPosition}
- rotation={iRotation}
- />
- <RemixLetter
- letterValue="x"
- marginLeft={xHorizontalPosition}
- marginTop={xVerticalPosition}
- />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/remix-not-animated.tsx b/packages/template-react-router/app/remotion/components/remix-logo/remix-not-animated.tsx
deleted file mode 100644
index fc8a2e3829..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/remix-not-animated.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { AbsoluteFill } from "remotion";
-import { RemixLetter } from "./remix-letter";
-
-interface Props {
- horizontalOffset?: number;
-}
-
-export const RemixNotAnimated = ({ horizontalOffset }: Props) => {
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(1)",
- }}
- >
- <RemixLetter letterValue="R" marginLeft={0} marginTop={411} />
- <RemixLetter letterValue="e" marginLeft={82} marginTop={411} />
- <RemixLetter letterValue="m" marginLeft={149} marginTop={411} />
- <RemixLetter letterValue="i" marginLeft={257} marginTop={411} />
- <RemixLetter letterValue="x" marginLeft={290} marginTop={411} />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remix-logo/remix-person-to-fusion.tsx b/packages/template-react-router/app/remotion/components/remix-logo/remix-person-to-fusion.tsx
deleted file mode 100644
index 313fb88b23..0000000000
--- a/packages/template-react-router/app/remotion/components/remix-logo/remix-person-to-fusion.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { RemixLetter } from "./remix-letter";
-
-interface Props {
- horizontalOffset?: number;
- progressOverride?: number;
-}
-
-export const RemixPersonToFusion = ({
- horizontalOffset,
- progressOverride,
-}: Props) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
-
- const progress = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- const progressToUse = progressOverride ?? progress;
-
- const mHorizontalPosition = interpolate(progressToUse, [0, 1], [210, 400]);
- const mVerticalPosition = interpolate(
- progressToUse,
- [0, 0.5, 1],
- [208, 160, 208],
- );
- const mRotation = interpolate(progressToUse, [0, 1], [90, 270]);
-
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(1)",
- }}
- >
- <RemixLetter letterValue="R" marginLeft={320} marginTop={411} />
- <RemixLetter letterValue="e" marginLeft={320} marginTop={220} />
- <RemixLetter
- letterValue="m"
- marginLeft={mHorizontalPosition}
- marginTop={mVerticalPosition}
- rotation={mRotation}
- />
- <RemixLetter
- letterValue="i"
- marginLeft={320}
- marginTop={255}
- rotation={90}
- />
- <RemixLetter letterValue="x" marginLeft={324} marginTop={324} />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/e.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/e.tsx
deleted file mode 100644
index e218dbfe07..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/e.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const d =
- "M874 421.5C874 456.696 845.668 485 811 485C776.332 485 748 456.696 748 421.5C748 386.304 776.332 358 811 358C845.668 358 874 386.304 874 421.5Z";
-
-const d1 = "M896 421.5 L 764 421.5";
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const E = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <g
- style={{
- transformBox: "fill-box",
- transformOrigin: "center center",
- }}
- >
- <path d={d1} stroke="currentcolor" strokeWidth={32} />
- <mask
- id="mask1_108_2"
- style={{
- maskType: "alpha",
- }}
- maskUnits="userSpaceOnUse"
- x="700"
- y="315"
- width="209"
- height="228"
- >
- <path
- d="M835 422H900.5L909 320.5L876.5 315L709.5 320.5L700 543H851L903 452.5H835V422Z"
- fill="black"
- />
- </mask>
- <g mask="url(#mask1_108_2)">
- <path d={d} stroke="currentcolor" strokeWidth="46" />
- </g>
- </g>
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/first-o.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/first-o.tsx
deleted file mode 100644
index 74fd545ecf..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/first-o.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const FirstO = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <g>
- <rect
- x={1216}
- y={359}
- width={126}
- height={126}
- stroke="black"
- strokeWidth={46}
- rx={63}
- />
- </g>
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/i.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/i.tsx
deleted file mode 100644
index 92c4ca4ced..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/i.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const p1 = "M1511 335 L1511 508";
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const I = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <g>
- <circle cx="1510.5" cy="293.5" r="22" fill="currentcolor" />
- <path d={p1} stroke="currentcolor" strokeWidth="46" />
- </g>
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/m.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/m.tsx
deleted file mode 100644
index 455df79e3b..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/m.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const path1 = `M949 508V406.455C949 379.142 971.142 357 998.455 357V357C1025.77 357 1047.91 379.142 1047.91 406.455V508`;
-const path2 = `M1048.55 508V406.455C1048.55 379.142 1070.69 357 1098 357V357C1125.31 357 1147.45 379.142 1147.45 406.455V508`;
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const M = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- transformOrigin: "center",
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path d={path1} stroke="currentcolor" strokeWidth="46" />
- <path d={path2} stroke="currentcolor" strokeWidth="46" />
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/n.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/n.tsx
deleted file mode 100644
index d5564bd85d..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/n.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const d =
- "M1771 485V415C1771 383.52 1796.52 358 1828 358V358C1859.48 358 1885 383.52 1885 415V485";
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const N = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path d={d} stroke="black" strokeWidth="46" strokeLinecap="square" />
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/r.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/r.tsx
deleted file mode 100644
index 0c62a4dffb..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/r.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const d = `M630 508
-V415
-C630 383.52 655.52 358 687 358
-h 16`;
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const R = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path d={d} strokeWidth="46" stroke="black" />
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-line-to-person.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/remotion-line-to-person.tsx
deleted file mode 100644
index 7c52385285..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-line-to-person.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { E } from "./e";
-import { FirstO } from "./first-o";
-import { I } from "./i";
-import { M } from "./m";
-import { N } from "./n";
-import { R } from "./r";
-import { SecondO } from "./second-o";
-import { T } from "./t";
-
-interface Props {
- horizontalOffset?: number;
-}
-
-export const RemotionLineToPerson = ({ horizontalOffset = 0 }: Props) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
-
- const progress = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- const tHorizontalPosition = interpolate(progress, [0, 1], [0, -810]);
-
- const iHorizontalPosition = interpolate(progress, [0, 1], [0, -798]);
-
- const nHorizontalPosition = interpolate(progress, [0, 1], [0, -1140]);
- const nVerticalPosition = interpolate(progress, [0, 1], [0, -100]);
-
- const rHorizontalPosition = interpolate(progress, [0, 1], [0, -80]);
- const rVerticalPosition = interpolate(progress, [0, 1], [0, -260]);
-
- const firstOHorizontalPosition = interpolate(progress, [0, 1], [0, -650]);
- const firstOVerticalPosition = interpolate(progress, [0, 1], [0, -440]);
-
- const secondOHorizontalPosition = interpolate(progress, [0, 1], [0, -982]);
- const secondOVerticalPosition = interpolate(progress, [0, 1], [0, -440]);
-
- const eHorizontalPosition = interpolate(progress, [0, 1], [0, -212]);
- const eVerticalPosition = interpolate(progress, [0, 1], [0, -107]);
-
- const mHorizontalPosition = interpolate(progress, [0, 1], [0, -140]);
- const mVerticalPosition = interpolate(progress, [0, 1], [0, -566]);
- const mRotation = interpolate(progress, [0, 1], [0, -90]);
-
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(0.45)",
- }}
- >
- <R marginLeft={rHorizontalPosition} marginTop={rVerticalPosition} />
- <E marginLeft={eHorizontalPosition} marginTop={eVerticalPosition} />
- <M
- marginLeft={mHorizontalPosition}
- marginTop={mVerticalPosition}
- rotation={mRotation}
- />
- <FirstO
- marginLeft={firstOHorizontalPosition}
- marginTop={firstOVerticalPosition}
- />
- <T marginLeft={tHorizontalPosition} />
- <I marginLeft={iHorizontalPosition} />
- <SecondO
- marginLeft={secondOHorizontalPosition}
- marginTop={secondOVerticalPosition}
- />
- <N marginLeft={nHorizontalPosition} marginTop={nVerticalPosition} />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-logo.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/remotion-logo.tsx
deleted file mode 100644
index f2002f9ec7..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-logo.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { AbsoluteFill } from "remotion";
-import { Triangle } from "./triangle";
-
-interface Props {
- size: number;
- color?: string;
-}
-
-export const RemotionLogo = ({ size, color = "#0B84F3" }: Props) => {
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- flexDirection: "column",
- alignItems: "center",
- justifyContent: "center",
- }}
- >
- <Triangle color={color} size={size} opacity={0.2} />
- <Triangle color={color} size={(size * 9) / 11} opacity={0.4} />
- <Triangle color={color} size={(size * 7) / 11} opacity={1} />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-not-animated.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/remotion-not-animated.tsx
deleted file mode 100644
index 28098661bc..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-not-animated.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { AbsoluteFill } from "remotion";
-import { E } from "./e";
-import { FirstO } from "./first-o";
-import { I } from "./i";
-import { M } from "./m";
-import { N } from "./n";
-import { R } from "./r";
-import { SecondO } from "./second-o";
-import { T } from "./t";
-
-interface Props {
- horizontalOffset?: number;
-}
-
-export const RemotionNotAnimated = ({ horizontalOffset = 0 }: Props) => {
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(0.45)",
- }}
- >
- <R />
- <E />
- <M />
- <FirstO />
- <T />
- <I />
- <SecondO />
- <N />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-person-to-fusion.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/remotion-person-to-fusion.tsx
deleted file mode 100644
index e66f952633..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/remotion-person-to-fusion.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { E } from "./e";
-import { FirstO } from "./first-o";
-import { I } from "./i";
-import { M } from "./m";
-import { N } from "./n";
-import { R } from "./r";
-import { SecondO } from "./second-o";
-import { T } from "./t";
-
-interface Props {
- horizontalOffset?: number;
- progressOverride?: number;
-}
-
-export const RemotionPersonToFusion = ({
- horizontalOffset = 0,
- progressOverride,
-}: Props) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
-
- const progress = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- const progressToUse = progressOverride ?? progress;
-
- const tHorizontalPosition = -810;
-
- const iHorizontalPosition = -798;
-
- const nHorizontalPosition = -1140;
- const nVerticalPosition = -100;
-
- const rHorizontalPosition = -80;
- const rVerticalPosition = -260;
-
- const firstOHorizontalPosition = -650;
- const firstOVerticalPosition = -440;
-
- const secondOHorizontalPosition = -982;
- const secondOVerticalPosition = -440;
-
- const eHorizontalPosition = -212;
- const eVerticalPosition = -107;
-
- const mHorizontalPosition = interpolate(progressToUse, [0, 1], [-140, -760]);
- const mVerticalPosition = interpolate(
- progressToUse,
- [0, 0.25, 0.75, 1],
- [-566, -790, -790, -566],
- );
- const mRotation = interpolate(progressToUse, [0, 1], [-90, -270]);
-
- return (
- <AbsoluteFill
- style={{
- display: "flex",
- left: `calc(16% + ${horizontalOffset}px)`,
- top: "7%",
- transform: "scale(0.45)",
- }}
- >
- <R marginLeft={rHorizontalPosition} marginTop={rVerticalPosition} />
- <E marginLeft={eHorizontalPosition} marginTop={eVerticalPosition} />
- <M
- marginLeft={mHorizontalPosition}
- marginTop={mVerticalPosition}
- rotation={mRotation}
- />
- <FirstO
- marginLeft={firstOHorizontalPosition}
- marginTop={firstOVerticalPosition}
- />
- <T marginLeft={tHorizontalPosition} />
- <I marginLeft={iHorizontalPosition} />
- <SecondO
- marginLeft={secondOHorizontalPosition}
- marginTop={secondOVerticalPosition}
- />
- <N marginLeft={nHorizontalPosition} marginTop={nVerticalPosition} />
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/second-o.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/second-o.tsx
deleted file mode 100644
index f6fe89aba8..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/second-o.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const SecondO = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <rect
- x={1642.5 - 126 / 2}
- y={421.5 - 126 / 2}
- width={126}
- height={126}
- stroke="currentcolor"
- strokeWidth={46}
- rx={63}
- />
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/t.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/t.tsx
deleted file mode 100644
index b2defed5c1..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/t.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { AbsoluteFill } from "remotion";
-
-const d1 = "M1410 292L1410 509";
-
-interface Props {
- marginLeft?: number;
- marginTop?: number;
- rotation?: number;
- scale?: number;
-}
-
-export const T = ({
- marginLeft = 0,
- marginTop = 0,
- rotation = 0,
- scale = 1,
-}: Props) => {
- return (
- <AbsoluteFill
- style={{
- marginLeft,
- marginTop,
- transform: `rotate(${rotation}deg) scale(${scale})`,
- }}
- >
- <svg
- viewBox="0 0 2100 800"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path d={d1} stroke="black" strokeWidth="46" />
- <path
- d="M1410 358L1451 358"
- stroke="black"
- strokeWidth="46"
- strokeLinecap="round"
- />
- </svg>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/app/remotion/components/remotion-logo/triangle.tsx b/packages/template-react-router/app/remotion/components/remotion-logo/triangle.tsx
deleted file mode 100644
index 93159ea401..0000000000
--- a/packages/template-react-router/app/remotion/components/remotion-logo/triangle.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-interface Props {
- size: number;
- opacity: number;
- color?: string;
-}
-
-export const Triangle = ({ size, opacity, color = "#0B84F3" }: Props) => {
- return (
- <svg
- width={size}
- height={size}
- style={{
- position: "absolute",
- transform: "rotate(90deg)",
- opacity,
- width: size,
- height: size,
- }}
- viewBox="0 0 400 400"
- >
- <g stroke={color} strokeWidth="100" strokeLinejoin="round">
- <path
- fill={color}
- d="M 102 272 a 196 100 0 0 0 195 5 A 196 240 0 0 0 200 102.259 A 196 240 0 0 0 102 272 z"
- />
- </g>
- </svg>
- );
-};
diff --git a/packages/template-react-router/app/remotion/constants.ts b/packages/template-react-router/app/remotion/constants.ts
index 68548f60ea..ba247e80d3 100644
--- a/packages/template-react-router/app/remotion/constants.ts
+++ b/packages/template-react-router/app/remotion/constants.ts
@@ -1,4 +1,5 @@
import { VERSION } from "remotion";
+import { z } from "zod";
export const COMPOSITION_FPS = 30;
export const COMPOSITION_DURATION_IN_FRAMES = 7 * COMPOSITION_FPS;
@@ -10,6 +11,10 @@ export const DISK = 10240;
export const TIMEOUT = 240;
export const SITE_NAME = "remotion-react-router-example-" + VERSION;
-export type LogoAnimationProps = {
- personalizedName: string;
+export const CompositionProps = z.object({
+ title: z.string(),
+});
+
+export const defaultMyCompProps: z.infer<typeof CompositionProps> = {
+ title: "React Router and Remotion",
};
diff --git a/packages/template-react-router/app/remotion/logo-animation.tsx b/packages/template-react-router/app/remotion/logo-animation.tsx
deleted file mode 100644
index b7590cfcce..0000000000
--- a/packages/template-react-router/app/remotion/logo-animation.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-import { useEffect } from "react";
-import {
- AbsoluteFill,
- interpolate,
- Sequence,
- Series,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from "remotion";
-import { LogoAnimationSequence } from "./components/logo-animation-sequence";
-import { PersonalizedName } from "./components/personalized-name";
-import { PlusSymbol } from "./components/plus-symbol";
-import { RemixLineToPerson } from "./components/remix-logo/remix-line-to-person";
-import { RemixNotAnimated } from "./components/remix-logo/remix-not-animated";
-import { RemixPersonToFusion } from "./components/remix-logo/remix-person-to-fusion";
-import { RemotionLineToPerson } from "./components/remotion-logo/remotion-line-to-person";
-import { RemotionNotAnimated } from "./components/remotion-logo/remotion-not-animated";
-import { RemotionPersonToFusion } from "./components/remotion-logo/remotion-person-to-fusion";
-import type { LogoAnimationProps } from "./constants";
-import { loadFonts } from "./load-fonts";
-
-export const LogoAnimation: React.FC<LogoAnimationProps> = (
- logoAnimationProps,
-) => {
- const { fps } = useVideoConfig();
- const frame = useCurrentFrame();
- const { personalizedName } = logoAnimationProps;
- useEffect(() => {
- loadFonts();
- }, []);
-
- const progress = spring({
- fps,
- frame,
- config: {
- damping: 200,
- },
- });
-
- const remixXOffset = interpolate(progress, [0, 1], [-900, 180]);
- const remotionXOffset = interpolate(progress, [0, 1], [900, 0]);
- const plusYOffset = interpolate(progress, [0, 1], [900, 0]);
-
- const opacity = spring({
- fps,
- frame: frame - fps * 1.5,
- config: {
- damping: 200,
- },
- });
-
- return (
- <AbsoluteFill
- style={{
- backgroundColor: "white",
- }}
- >
- <Series>
- <Series.Sequence durationInFrames={fps * 1.5}>
- <PersonalizedName personalizedName={personalizedName} />
- </Series.Sequence>
- <Series.Sequence durationInFrames={fps * 1.5}>
- <AbsoluteFill
- style={{
- opacity,
- }}
- >
- <RemixNotAnimated horizontalOffset={remixXOffset} />
- <RemotionNotAnimated horizontalOffset={remotionXOffset} />
- <PlusSymbol verticalOffset={plusYOffset} />
- </AbsoluteFill>
- </Series.Sequence>
- <Series.Sequence durationInFrames={fps * 1.5}>
- <RemixLineToPerson horizontalOffset={remixXOffset} />
- <RemotionLineToPerson horizontalOffset={remotionXOffset} />
- <PlusSymbol />
- </Series.Sequence>
- <Series.Sequence durationInFrames={fps * 1.5}>
- <RemixPersonToFusion horizontalOffset={remixXOffset} />
- <RemotionPersonToFusion horizontalOffset={remotionXOffset} />
- <PlusSymbol />
- </Series.Sequence>
- </Series>
- <Sequence from={fps * 5.5} durationInFrames={fps * 4}>
- <LogoAnimationSequence />
- </Sequence>
- </AbsoluteFill>
- );
-};
diff --git a/packages/template-react-router/package.json b/packages/template-react-router/package.json
index 445804e405..eaac5b1249 100644
--- a/packages/template-react-router/package.json
+++ b/packages/template-react-router/package.json
@@ -21,6 +21,7 @@
"@remotion/cli": "workspace:*",
"@remotion/lambda": "workspace:*",
"@remotion/player": "workspace:*",
+ "@remotion/google-fonts": "workspace:*",
"isbot": "4.1.0",
"react": "19.0.0",
"react-dom": "19.0.0",
@@ -28,7 +29,8 @@
"react-router-dom": "7.2.0",
"remotion": "workspace:*",
"vite": "^5.4.12",
- "vite-tsconfig-paths": "^4.2.1"
+ "vite-tsconfig-paths": "^4.2.1",
+ "zod": "3.22.3"
},
"devDependencies": {
"@react-router/dev": "7.2.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9d95c4864e..87693136ec 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2755,6 +2755,9 @@ importers:
'@remotion/cli':
specifier: workspace:*
version: link:../cli
+ '@remotion/google-fonts':
+ specifier: workspace:*
+ version: link:../google-fonts
'@remotion/lambda':
specifier: workspace:*
version: link:../lambda
@@ -2785,6 +2788,9 @@ importers:
vite-tsconfig-paths:
specifier: ^4.2.1
+ zod:
+ specifier: 3.22.3
+ version: 3.22.3
devDependencies:
'@react-router/dev':
specifier: 7.2.0