Skip to content

🎥 Make videos programmatically with React

run skills

Jonny Burgera4db4cb29a21
diff --git a/packages/skills/src/Root.tsx b/packages/skills/src/Root.tsx
index 9339f98a76..0abcb26909 100644
--- a/packages/skills/src/Root.tsx
+++ b/packages/skills/src/Root.tsx
@@ -4,6 +4,16 @@ import {
COMPOSITION_WIDTH,
MyAnimation,
} from '../skills/charts/assets/animated-shapes';
+import {MyAnimation as ChatMessagesAnimation} from '../skills/example-chat-messages/assets/example';
+import {MyAnimation as CounterAnimation} from '../skills/example-counter/assets/example';
+import {MyAnimation as FallingSpheresAnimation} from '../skills/example-falling-spheres/assets/example';
+import {MyAnimation as GoldPriceChartAnimation} from '../skills/example-gold-price-chart/assets/example';
+import {MyAnimation as HistogramAnimation} from '../skills/example-histogram/assets/example';
+import {MyAnimation as ProgressBarAnimation} from '../skills/example-progress-bar/assets/example';
+import {MyAnimation as StaggeredListAnimation} from '../skills/example-staggered-list/assets/example';
+import {MyAnimation as TextRotationAnimation} from '../skills/example-text-rotation/assets/example';
+import {MyAnimation as TypewriterHighlightAnimation} from '../skills/example-typewriter-highlight/assets/example';
+import {MyAnimation as WordCarouselAnimation} from '../skills/example-word-carousel/assets/example';
import {MyAnimation as LottieAnimation} from '../skills/lottie/assets/example';
export const RemotionRoot = () => {
@@ -25,6 +35,86 @@ export const RemotionRoot = () => {
width={1080}
height={1080}
/>
+ <Composition
+ id="Histogram"
+ component={HistogramAnimation}
+ durationInFrames={90}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="ProgressBar"
+ component={ProgressBarAnimation}
+ durationInFrames={90}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="Counter"
+ component={CounterAnimation}
+ durationInFrames={90}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="TextRotation"
+ component={TextRotationAnimation}
+ durationInFrames={180}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="ChatMessages"
+ component={ChatMessagesAnimation}
+ durationInFrames={180}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="FallingSpheres"
+ component={FallingSpheresAnimation}
+ durationInFrames={150}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="GoldPriceChart"
+ component={GoldPriceChartAnimation}
+ durationInFrames={120}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="TypewriterHighlight"
+ component={TypewriterHighlightAnimation}
+ durationInFrames={180}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="WordCarousel"
+ component={WordCarouselAnimation}
+ durationInFrames={200}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
+ <Composition
+ id="StaggeredList"
+ component={StaggeredListAnimation}
+ durationInFrames={120}
+ fps={30}
+ width={1080}
+ height={1080}
+ />
</>
);
};
diff --git a/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts
index 8adc92bea5..7705ca9ec3 100644
--- a/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts
+++ b/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts
@@ -4,7 +4,6 @@ import { counterAnimationExample } from "./counter-animation";
import { histogramExample } from "./histogram";
import { progressBarExample } from "./progress-bar";
import { animatedShapesExample } from "./animated-shapes";
-import { morphingHexagonsExample } from "./morphing-hexagons";
import { lottieAnimationExample } from "./lottie-animation";
import { fallingSpheresExample } from "./falling-spheres";
import { goldPriceChartExample } from "./gold-price-chart";
@@ -29,7 +28,6 @@ export const examples: RemotionExample[] = [
histogramExample,
progressBarExample,
animatedShapesExample,
- morphingHexagonsExample,
lottieAnimationExample,
fallingSpheresExample,
goldPriceChartExample,
diff --git a/packages/template-prompt-to-motion-graphics/src/examples/code/morphing-hexagons.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/morphing-hexagons.ts
deleted file mode 100644
index c647056729..0000000000
--- a/packages/template-prompt-to-motion-graphics/src/examples/code/morphing-hexagons.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-import { RemotionExample } from "./index";
-
-export const morphingHexagonsCode = `import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate, spring } from "remotion";
-
-export const MyAnimation = () => {
- const frame = useCurrentFrame();
- const { fps } = useVideoConfig();
-
- const hexSize = 50;
- const cols = 7;
- const rows = 5;
-
- const hexagons: Array<{ x: number; y: number; delay: number }> = [];
- for (let row = 0; row < rows; row++) {
- for (let col = 0; col < cols; col++) {
- const offsetX = row % 2 === 0 ? 0 : hexSize * 0.866;
- hexagons.push({
- x: col * hexSize * 1.732 + offsetX,
- y: row * hexSize * 1.5,
- delay: (row + col) * 3,
- });
- }
- }
-
- const gridWidth = (cols - 1) * hexSize * 1.732 + hexSize;
- const gridHeight = (rows - 1) * hexSize * 1.5 + hexSize * 2;
-
- return (
- <AbsoluteFill
- style={{
- backgroundColor: "#0a0a0f",
- justifyContent: "center",
- alignItems: "center",
- }}
- >
- <svg
- width={gridWidth + 100}
- height={gridHeight + 100}
- viewBox={\`-50 -50 \${gridWidth + 100} \${gridHeight + 100}\`}
- >
- <defs>
- <filter id="glow">
- <feGaussianBlur stdDeviation="3" result="coloredBlur" />
- <feMerge>
- <feMergeNode in="coloredBlur" />
- <feMergeNode in="SourceGraphic" />
- </feMerge>
- </filter>
- </defs>
- {hexagons.map((hex, i) => {
- const wave = Math.sin((frame - hex.delay) * 0.08);
- const pulse = interpolate(wave, [-1, 1], [0.6, 1]);
-
- const hue = interpolate(
- (frame + hex.delay * 2) % 240,
- [0, 120, 240],
- [280, 200, 280]
- );
-
- const opacity = interpolate(wave, [-1, 1], [0.3, 0.9]);
-
- const scale = interpolate(wave, [-1, 1], [0.7, 1]);
-
- const entrance = spring({
- frame: frame - hex.delay,
- fps,
- config: { damping: 15, stiffness: 120 },
- });
-
- const points: string[] = [];
- for (let j = 0; j < 6; j++) {
- const angle = (Math.PI / 3) * j - Math.PI / 6;
- const px = hex.x + hexSize * scale * entrance * Math.cos(angle);
- const py = hex.y + hexSize * scale * entrance * Math.sin(angle);
- points.push(\`\${px},\${py}\`);
- }
-
- return (
- <polygon
- key={i}
- points={points.join(" ")}
- fill="none"
- stroke={\`hsl(\${hue}, 80%, 60%)\`}
- strokeWidth={2 * pulse}
- opacity={opacity * entrance}
- filter="url(#glow)"
- />
- );
- })}
- </svg>
- </AbsoluteFill>
- );
-};`;
-
-export const morphingHexagonsExample: RemotionExample = {
- id: "morphing-hexagons",
- name: "Morphing Hexagons",
- description:
- "Mesmerizing hexagon grid with pulsing and color-shifting effects",
- category: "Other",
- durationInFrames: 240,
- fps: 30,
- code: morphingHexagonsCode,
-};