🎥 Make videos programmatically with React
reduce amount of skills
Jonny Burger747bc5099de8
diff --git a/packages/skills/skills/example-counter/SKILL.md b/packages/skills/skills/example-counter/SKILL.mddeleted file mode 100644index f0bab52db3..0000000000--- a/packages/skills/skills/example-counter/SKILL.md+++ /dev/null@@ -1,22 +0,0 @@-----name: example-counter-description: Complete working example of animated number counters with multiple metrics, staggered animations, and color-coded values.-metadata:- category: Charts- durationInFrames: 150- fps: 30------## Counter Animation Example--Animated number counters displaying multiple metrics with staggered entrances.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- Multiple metric counters animating simultaneously-- Staggered entrance animations for each metric-- Support for prefixes ($) and suffixes (%)-- Tabular numeric font for stable width-- Fade and slide entrance effectsdiff --git a/packages/skills/skills/example-counter/assets/example.tsx b/packages/skills/skills/example-counter/assets/example.tsxdeleted file mode 100644index 9a96c3c499..0000000000--- a/packages/skills/skills/example-counter/assets/example.tsx+++ /dev/null@@ -1,81 +0,0 @@-import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate } from "remotion";--export const MyAnimation = () => {- const frame = useCurrentFrame();- const { durationInFrames } = useVideoConfig();-- const metrics = [- { label: "Users", target: 10000, color: "#4f46e5" },- { label: "Revenue", target: 50000, prefix: "$", color: "#10b981" },- { label: "Growth", target: 127, suffix: "%", color: "#f59e0b" },- ];-- const progress = interpolate(- frame,- [0, durationInFrames * 0.7],- [0, 1],- { extrapolateRight: "clamp" }- );-- return (- <AbsoluteFill- style={{- backgroundColor: "#0f0f0f",- justifyContent: "center",- alignItems: "center",- }}- >- <div- style={{- display: "flex",- gap: 60,- }}- >- {metrics.map((metric, i) => {- const staggeredProgress = interpolate(- progress,- [i * 0.15, i * 0.15 + 0.7],- [0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" }- );-- const value = Math.round(metric.target * staggeredProgress);-- return (- <div- key={i}- style={{- textAlign: "center",- opacity: interpolate(staggeredProgress, [0, 0.2], [0, 1]),- transform: `translateY(${(1 - staggeredProgress) * 20}px)`,- minWidth: 200,- }}- >- <div- style={{- fontSize: 72,- fontWeight: "bold",- color: metric.color,- fontFamily: "system-ui, sans-serif",- fontVariantNumeric: "tabular-nums",- }}- >- {metric.prefix || ""}{value.toLocaleString()}{metric.suffix || ""}- </div>- <div- style={{- fontSize: 24,- color: "#888",- marginTop: 8,- fontFamily: "system-ui, sans-serif",- }}- >- {metric.label}- </div>- </div>- );- })}- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/spring-physics/SKILL.md b/packages/skills/skills/spring-physics/SKILL.mdindex 524e7e14eb..9b3be6c145 100644--- a/packages/skills/skills/spring-physics/SKILL.md+++ b/packages/skills/skills/spring-physics/SKILL.md@@ -13,7 +13,7 @@ Use spring() for natural motion, interpolate() only for linear progress.**Incorrect (mechanical motion):**```tsx-const scale = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp" });+const scale = interpolate(frame, [0, 30], [0, 1], {extrapolateRight: 'clamp'});```**Correct (organic spring motion):**@@ -22,8 +22,8 @@ const scale = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp" })const scale = spring({frame,fps,- config: { damping: 12, stiffness: 100 },- durationInFrames: 30+ config: {damping: 12, stiffness: 100},+ durationInFrames: 30,});```@@ -34,10 +34,10 @@ spring({frame,fps,config: {- damping: 10, // Higher = less bounce (10-200)- stiffness: 100, // Higher = faster snap (50-200)- mass: 1, // Higher = more inertia (0.5-3)- }+ damping: 10, // Higher = less bounce (10-200)+ stiffness: 100, // Higher = faster snap (50-200)+ mass: 1, // Higher = more inertia (0.5-3)+ },});```@@ -45,16 +45,16 @@ spring({```tsx// Snappy, minimal bounce (UI elements)-const snappy = { damping: 20, stiffness: 200 };+const snappy = {damping: 20, stiffness: 200};// Bouncy entrance (playful animations)-const bouncy = { damping: 8, stiffness: 100 };+const bouncy = {damping: 8, stiffness: 100};// Smooth, no bounce (subtle reveals)-const smooth = { damping: 200, stiffness: 100 };+const smooth = {damping: 200, stiffness: 100};// Heavy, slow (large objects)-const heavy = { damping: 15, stiffness: 80, mass: 2 };+const heavy = {damping: 15, stiffness: 80, mass: 2};```## Delayed Spring Start@@ -64,7 +64,7 @@ Offset the frame for delayed spring animations:**Incorrect (spring starts immediately):**```tsx-const entrance = spring({ frame, fps, config: { damping: 12 } });+const entrance = spring({frame, fps, config: {damping: 12}});```**Correct (spring starts after delay):**@@ -74,7 +74,7 @@ const ENTRANCE_DELAY = 20;const entrance = spring({frame: frame - ENTRANCE_DELAY,fps,- config: { damping: 12, stiffness: 100 }+ config: {damping: 12, stiffness: 100},});// Returns 0 until frame 20, then animates to 1```@@ -87,13 +87,11 @@ For bouncy scale animations that overshoot:const bounce = spring({frame,fps,- config: { damping: 8, stiffness: 150 }+ config: {damping: 8, stiffness: 150},});// Will overshoot past 1.0 before settling-<div style={{ transform: `scale(${bounce})` }}>- {content}-</div>+<div style={{transform: `scale(${bounce})`}}>{content}</div>;```## Combining Spring with Interpolate@@ -118,11 +116,11 @@ const translateY = interpolate(springProgress, [0, 1], [50, 0]);const PHASE_1_END = 30;const PHASE_2_START = 25; // Slight overlap-const phase1 = spring({ frame, fps, config: { damping: 15 } });+const phase1 = spring({frame, fps, config: {damping: 15}});const phase2 = spring({frame: frame - PHASE_2_START,fps,- config: { damping: 12 }+ config: {damping: 12},});// phase1 controls entrance, phase2 controls secondary motion@@ -131,5 +129,5 @@ const phase2 = spring({## Complete ExamplesFor full working code examples, see:+- [Animated Shapes Example](../example-animated-shapes/SKILL.md) - Bouncing and rotating shapes with spring-- [Morphing Hexagons Example](../example-morphing-hexagons/SKILL.md) - Pulsing hexagon grid with springsdiff --git a/packages/skills/skills/text-animations/assets/text-rotation.tsx b/packages/skills/skills/text-animations/assets/text-rotation.tsxindex fdad67f957..1e7c23e531 100644--- a/packages/skills/skills/text-animations/assets/text-rotation.tsx+++ b/packages/skills/skills/text-animations/assets/text-rotation.tsx@@ -1,71 +1,74 @@-import { useCurrentFrame, AbsoluteFill, interpolate } from "remotion";+import {+ AbsoluteFill,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';-export const MyAnimation = () => {- const frame = useCurrentFrame();+const WORDS = ['This is a', 'Text rotation example', 'using Remotion!'];- // Text content - easily customizable- const WORDS = ["This is a", "Text rotation example", "using Remotion!"];+const FONT_SIZE = 120;+const FONT_WEIGHT = 'bold';+const COLOR_TEXT = '#eee';+const COLOR_BACKGROUND = '#1a1a2e';+const BLUR_AMOUNT = 10;- // Animation timing- const WORD_DURATION = 60; // frames per word- const FADE_IN_DURATION = 15;- const FADE_OUT_START = 45;+export const MyAnimation = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();- // Visual styling- const FONT_SIZE = 120;- const FONT_WEIGHT = "bold";- const COLOR_TEXT = "#eee";- const COLOR_BACKGROUND = "#1a1a2e";- const BLUR_AMOUNT = 10;+ const WORD_DURATION = 0 * fps;+ const FADE_IN_DURATION = 0.5 * fps;+ const FADE_OUT_START = 1.5 * fps;- const currentWordIndex = Math.floor(frame / WORD_DURATION) % WORDS.length;- const frameInWord = frame % WORD_DURATION;+ const currentWordIndex = Math.floor(frame / WORD_DURATION) % WORDS.length;+ const frameInWord = frame % WORD_DURATION;- // Fade in/out animation- const opacity = interpolate(- frameInWord,- [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],- [0, 1, 1, 0],- { extrapolateRight: "clamp" }- );+ // Fade in/out animation+ const opacity = interpolate(+ frameInWord,+ [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],+ [0, 1, 1, 0],+ {extrapolateRight: 'clamp'},+ );- // Scale animation- const scale = interpolate(- frameInWord,- [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],- [0.8, 1, 1, 1.2],- { extrapolateRight: "clamp" }- );+ // Scale animation+ const scale = interpolate(+ frameInWord,+ [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],+ [0.8, 1, 1, 1.2],+ {extrapolateRight: 'clamp'},+ );- // Blur animation- const blur = interpolate(- frameInWord,- [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],- [BLUR_AMOUNT, 0, 0, BLUR_AMOUNT],- { extrapolateRight: "clamp" }- );+ // Blur animation+ const blur = interpolate(+ frameInWord,+ [0, FADE_IN_DURATION, FADE_OUT_START, WORD_DURATION],+ [BLUR_AMOUNT, 0, 0, BLUR_AMOUNT],+ {extrapolateRight: 'clamp'},+ );- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BACKGROUND,- justifyContent: "center",- alignItems: "center",- }}- >- <h1- style={{- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- color: COLOR_TEXT,- opacity,- transform: `scale(${scale})`,- filter: `blur(${blur}px)`,- fontFamily: "system-ui, sans-serif",- }}- >- {WORDS[currentWordIndex]}- </h1>- </AbsoluteFill>- );+ return (+ <AbsoluteFill+ style={{+ backgroundColor: COLOR_BACKGROUND,+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <div+ style={{+ fontSize: FONT_SIZE,+ fontWeight: FONT_WEIGHT,+ color: COLOR_TEXT,+ opacity,+ transform: `scale(${scale})`,+ filter: `blur(${blur}px)`,+ fontFamily: 'system-ui, sans-serif',+ }}+ >+ {WORDS[currentWordIndex]}+ </div>+ </AbsoluteFill>+ );};diff --git a/packages/skills/skills/text-animations/assets/typewriter.tsx b/packages/skills/skills/text-animations/assets/typewriter.tsxindex b09a82c259..396537598f 100644--- a/packages/skills/skills/text-animations/assets/typewriter.tsx+++ b/packages/skills/skills/text-animations/assets/typewriter.tsx@@ -1,79 +1,74 @@import {- useCurrentFrame,- useVideoConfig,- AbsoluteFill,- interpolate,-} from "remotion";+ AbsoluteFill,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';export const MyAnimation = () => {- /*- * Typewriter effect with blinking cursor and optional dramatic pause.- */- const frame = useCurrentFrame();- const { fps } = useVideoConfig();+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();- const COLOR_BG = "#ffffff";- const COLOR_TEXT = "#000000";+ const COLOR_BG = '#ffffff';+ const COLOR_TEXT = '#000000';- const FULL_TEXT = "From prompt to motion graphics. This is Remotion.";- const CARET_SYMBOL = "\u258C";- const PAUSE_AFTER = "From prompt to motion graphics.";+ const FULL_TEXT = 'From prompt to motion graphics. This is Remotion.';+ const CARET_SYMBOL = '\u258C';+ const PAUSE_AFTER = 'From prompt to motion graphics.';- const FONT_SIZE = 72;- const FONT_WEIGHT = 700;- const CHAR_FRAMES = 2;- const CURSOR_BLINK_FRAMES = 16;- const PAUSE_SECONDS = 1;+ const FONT_SIZE = 72;+ const FONT_WEIGHT = 700;+ const CHAR_FRAMES = 2;+ const CURSOR_BLINK_FRAMES = 16;+ const PAUSE_SECONDS = 1;- const PAUSE_FRAMES = Math.round(fps * PAUSE_SECONDS);+ const PAUSE_FRAMES = Math.round(fps * PAUSE_SECONDS);- const pauseIndex = FULL_TEXT.indexOf(PAUSE_AFTER);- const preLen = pauseIndex >= 0 ? pauseIndex + PAUSE_AFTER.length : FULL_TEXT.length;- const postLen = FULL_TEXT.length - preLen;+ const pauseIndex = FULL_TEXT.indexOf(PAUSE_AFTER);+ const preLen =+ pauseIndex >= 0 ? pauseIndex + PAUSE_AFTER.length : FULL_TEXT.length;- let typedChars = 0;- if (frame < preLen * CHAR_FRAMES) {- typedChars = Math.floor(frame / CHAR_FRAMES);- } else if (frame < preLen * CHAR_FRAMES + PAUSE_FRAMES) {- typedChars = preLen;- } else {- const postPhase = frame - preLen * CHAR_FRAMES - PAUSE_FRAMES;- typedChars = Math.min(- FULL_TEXT.length,- preLen + Math.floor(postPhase / CHAR_FRAMES),- );- }- const typedText = FULL_TEXT.slice(0, typedChars);+ let typedChars = 0;+ if (frame < preLen * CHAR_FRAMES) {+ typedChars = Math.floor(frame / CHAR_FRAMES);+ } else if (frame < preLen * CHAR_FRAMES + PAUSE_FRAMES) {+ typedChars = preLen;+ } else {+ const postPhase = frame - preLen * CHAR_FRAMES - PAUSE_FRAMES;+ typedChars = Math.min(+ FULL_TEXT.length,+ preLen + Math.floor(postPhase / CHAR_FRAMES),+ );+ }+ const typedText = FULL_TEXT.slice(0, typedChars);- const caretOpacity = interpolate(- frame % CURSOR_BLINK_FRAMES,- [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],- [1, 0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },- );+ const caretOpacity = interpolate(+ frame % CURSOR_BLINK_FRAMES,+ [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],+ [1, 0, 1],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- display: "flex",- alignItems: "center",- justifyContent: "center",- fontFamily: "Inter, sans-serif",- }}- >- <div- style={{- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- lineHeight: 1.15,- whiteSpace: "pre-wrap",- }}- >- <span>{typedText}</span>- <span style={{ opacity: caretOpacity }}>{CARET_SYMBOL}</span>- </div>- </AbsoluteFill>- );+ return (+ <AbsoluteFill+ style={{+ backgroundColor: COLOR_BG,+ display: 'flex',+ fontFamily: 'Inter, sans-serif',+ }}+ >+ <div+ style={{+ color: COLOR_TEXT,+ fontSize: FONT_SIZE,+ fontWeight: FONT_WEIGHT,+ lineHeight: 1.15,+ whiteSpace: 'pre-wrap',+ }}+ >+ <span>{typedText}</span>+ <span style={{opacity: caretOpacity}}>{CARET_SYMBOL}</span>+ </div>+ </AbsoluteFill>+ );};diff --git a/packages/skills/skills/text-animations/assets/word-carousel.tsx b/packages/skills/skills/text-animations/assets/word-carousel.tsxindex 2b3581fb4f..2cfe637e43 100644--- a/packages/skills/skills/text-animations/assets/word-carousel.tsx+++ b/packages/skills/skills/text-animations/assets/word-carousel.tsx@@ -1,118 +1,119 @@-import { useCurrentFrame, AbsoluteFill, interpolate } from "remotion";+import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';++/*+ * Prefix text with rotating words that crossfade with blur.+ */export const MyAnimation = () => {- /*- * Prefix text with rotating words that crossfade with blur.- */- const frame = useCurrentFrame();+ const frame = useCurrentFrame();- const COLOR_TEXT = "#7b92c1";- const PREFIX = "Created for";- const WORDS = ["Creators", "Marketers", "Developers", "Everyone"];+ const COLOR_TEXT = '#7b92c1';+ const PREFIX = 'Created for';+ const WORDS = ['Creators', 'Marketers', 'Developers', 'Everyone'];- const PREFIX_FONT_SIZE = 80;- const WORD_FONT_SIZE = 80;- const PREFIX_WEIGHT = 300;- const WORD_WEIGHT = 700;- const WORD_GAP = 20;- const HOLD_DURATION = 32;- const FLIP_DURATION = 18;- const BLUR_AMOUNT = 6;+ const PREFIX_FONT_SIZE = 80;+ const WORD_FONT_SIZE = 80;+ const PREFIX_WEIGHT = 300;+ const WORD_WEIGHT = 700;+ const WORD_GAP = 20;+ const HOLD_DURATION = 32;+ const FLIP_DURATION = 18;+ const BLUR_AMOUNT = 6;- const perStep = HOLD_DURATION + FLIP_DURATION;- const totalSteps = WORDS.length;- const currentStep = Math.floor(frame / perStep) % totalSteps;- const nextStep = (currentStep + 1) % totalSteps;- const phase = frame % perStep;- const isFlipping = phase >= HOLD_DURATION;- const flipProgress = isFlipping ? (phase - HOLD_DURATION) / FLIP_DURATION : 0;+ const perStep = HOLD_DURATION + FLIP_DURATION;+ const totalSteps = WORDS.length;+ const currentStep = Math.floor(frame / perStep) % totalSteps;+ const nextStep = (currentStep + 1) % totalSteps;+ const phase = frame % perStep;+ const isFlipping = phase >= HOLD_DURATION;+ const flipProgress = isFlipping ? (phase - HOLD_DURATION) / FLIP_DURATION : 0;- const outOpacity = interpolate(flipProgress, [0, 1], [1, 0], {- extrapolateLeft: "clamp",- extrapolateRight: "clamp",- });- const inOpacity = interpolate(flipProgress, [0, 1], [0, 1], {- extrapolateLeft: "clamp",- extrapolateRight: "clamp",- });- const outBlur = interpolate(flipProgress, [0, 1], [0, BLUR_AMOUNT], {- extrapolateLeft: "clamp",- extrapolateRight: "clamp",- });- const inBlur = interpolate(flipProgress, [0, 1], [BLUR_AMOUNT, 0], {- extrapolateLeft: "clamp",- extrapolateRight: "clamp",- });+ const outOpacity = interpolate(flipProgress, [0, 1], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const inOpacity = interpolate(flipProgress, [0, 1], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const outBlur = interpolate(flipProgress, [0, 1], [0, BLUR_AMOUNT], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const inBlur = interpolate(flipProgress, [0, 1], [BLUR_AMOUNT, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });- const longestWord = WORDS.reduce(- (a, b) => (a.length >= b.length ? a : b),- WORDS[0],- );+ const longestWord = WORDS.reduce(+ (a, b) => (a.length >= b.length ? a : b),+ WORDS[0],+ );- return (- <AbsoluteFill- style={{- display: "flex",- alignItems: "center",- justifyContent: "center",- fontFamily: "Inter, sans-serif",- }}- >- <div- style={{- display: "flex",- alignItems: "baseline",- gap: WORD_GAP,- color: COLOR_TEXT,- }}- >- <div style={{ fontSize: PREFIX_FONT_SIZE, fontWeight: PREFIX_WEIGHT }}>- {PREFIX}- </div>- <div- style={{- position: "relative",- fontSize: WORD_FONT_SIZE,- fontWeight: WORD_WEIGHT,- }}- >- {/* Invisible width keeper */}- <div style={{ visibility: "hidden" }}>{longestWord}</div>- {/* Current word (fades out during flip) */}- {!isFlipping && (- <div style={{ position: "absolute", left: 0, top: 0 }}>- {WORDS[currentStep]}- </div>- )}- {/* Crossfade during flip */}- {isFlipping && (- <>- <div- style={{- position: "absolute",- left: 0,- top: 0,- opacity: outOpacity,- filter: `blur(${outBlur}px)`,- }}- >- {WORDS[currentStep]}- </div>- <div- style={{- position: "absolute",- left: 0,- top: 0,- opacity: inOpacity,- filter: `blur(${inBlur}px)`,- }}- >- {WORDS[nextStep]}- </div>- </>- )}- </div>- </div>- </AbsoluteFill>- );+ return (+ <AbsoluteFill+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'Inter, sans-serif',+ }}+ >+ <div+ style={{+ display: 'flex',+ alignItems: 'baseline',+ gap: WORD_GAP,+ color: COLOR_TEXT,+ }}+ >+ <div style={{fontSize: PREFIX_FONT_SIZE, fontWeight: PREFIX_WEIGHT}}>+ {PREFIX}+ </div>+ <div+ style={{+ position: 'relative',+ fontSize: WORD_FONT_SIZE,+ fontWeight: WORD_WEIGHT,+ }}+ >+ {/* Invisible width keeper */}+ <div style={{visibility: 'hidden'}}>{longestWord}</div>+ {/* Current word (fades out during flip) */}+ {!isFlipping && (+ <div style={{position: 'absolute', left: 0, top: 0}}>+ {WORDS[currentStep]}+ </div>+ )}+ {/* Crossfade during flip */}+ {isFlipping && (+ <>+ <div+ style={{+ position: 'absolute',+ left: 0,+ top: 0,+ opacity: outOpacity,+ filter: `blur(${outBlur}px)`,+ }}+ >+ {WORDS[currentStep]}+ </div>+ <div+ style={{+ position: 'absolute',+ left: 0,+ top: 0,+ opacity: inOpacity,+ filter: `blur(${inBlur}px)`,+ }}+ >+ {WORDS[nextStep]}+ </div>+ </>+ )}+ </div>+ </div>+ </AbsoluteFill>+ );};diff --git a/packages/skills/skills/text-animations/assets/word-highlight.tsx b/packages/skills/skills/text-animations/assets/word-highlight.tsxindex c6d63e1d40..a29b569536 100644--- a/packages/skills/skills/text-animations/assets/word-highlight.tsx+++ b/packages/skills/skills/text-animations/assets/word-highlight.tsx@@ -1,91 +1,87 @@-import {- useCurrentFrame,- useVideoConfig,- AbsoluteFill,- spring,-} from "remotion";+import {AbsoluteFill, spring, useCurrentFrame, useVideoConfig} from 'remotion';++/*+ * Highlight a word in a sentence with a spring-animated wipe effect.+ */export const MyAnimation = () => {- /*- * Highlight a word in a sentence with a spring-animated wipe effect.- */- const frame = useCurrentFrame();- const { fps } = useVideoConfig();+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();- const COLOR_BG = "#ffffff";- const COLOR_TEXT = "#000000";- const COLOR_HIGHLIGHT = "#A7C7E7";+ const COLOR_BG = '#ffffff';+ const COLOR_TEXT = '#000000';+ const COLOR_HIGHLIGHT = '#A7C7E7';- const FULL_TEXT = "From prompt to motion graphics. This is Remotion.";- const HIGHLIGHT_WORD = "Remotion";+ const FULL_TEXT = 'This is Remotion.';+ const HIGHLIGHT_WORD = 'Remotion';- const FONT_SIZE = 72;- const FONT_WEIGHT = 700;- const HIGHLIGHT_START_FRAME = 30;- const HIGHLIGHT_WIPE_DURATION = 18;+ const FONT_SIZE = 72;+ const FONT_WEIGHT = 700;+ const HIGHLIGHT_START_FRAME = 30;+ const HIGHLIGHT_WIPE_DURATION = 18;- const highlightIndex = FULL_TEXT.indexOf(HIGHLIGHT_WORD);- const hasHighlight = highlightIndex >= 0;- const preText = hasHighlight ? FULL_TEXT.slice(0, highlightIndex) : FULL_TEXT;- const postText = hasHighlight- ? FULL_TEXT.slice(highlightIndex + HIGHLIGHT_WORD.length)- : "";+ const highlightIndex = FULL_TEXT.indexOf(HIGHLIGHT_WORD);+ const hasHighlight = highlightIndex >= 0;+ const preText = hasHighlight ? FULL_TEXT.slice(0, highlightIndex) : FULL_TEXT;+ const postText = hasHighlight+ ? FULL_TEXT.slice(highlightIndex + HIGHLIGHT_WORD.length)+ : '';- const highlightProgress = spring({- fps,- frame: frame - HIGHLIGHT_START_FRAME,- config: { damping: 200, stiffness: 180 },- durationInFrames: HIGHLIGHT_WIPE_DURATION,- });- const highlightScaleX = Math.max(0, Math.min(1, highlightProgress));+ const highlightProgress = spring({+ fps,+ frame: frame - HIGHLIGHT_START_FRAME,+ config: {damping: 200, stiffness: 180},+ durationInFrames: HIGHLIGHT_WIPE_DURATION,+ });+ const highlightScaleX = Math.max(0, Math.min(1, highlightProgress));- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- display: "flex",- alignItems: "center",- justifyContent: "center",- fontFamily: "Inter, sans-serif",- }}- >- <div- style={{- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- lineHeight: 1.15,- whiteSpace: "pre-wrap",- }}- >- {hasHighlight ? (- <>- <span>{preText}</span>- <span style={{ position: "relative", display: "inline-block" }}>- <span- style={{- position: "absolute",- left: 0,- right: 0,- top: "50%",- height: "1.05em",- transform: `translateY(-50%) scaleX(${highlightScaleX})`,- transformOrigin: "left center",- backgroundColor: COLOR_HIGHLIGHT,- borderRadius: "0.18em",- zIndex: 0,- }}- />- <span style={{ position: "relative", zIndex: 1 }}>- {HIGHLIGHT_WORD}- </span>- </span>- <span>{postText}</span>- </>- ) : (- <span>{FULL_TEXT}</span>- )}- </div>- </AbsoluteFill>- );+ return (+ <AbsoluteFill+ style={{+ backgroundColor: COLOR_BG,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'Inter, sans-serif',+ }}+ >+ <div+ style={{+ color: COLOR_TEXT,+ fontSize: FONT_SIZE,+ fontWeight: FONT_WEIGHT,+ lineHeight: 1.15,+ whiteSpace: 'pre-wrap',+ }}+ >+ {hasHighlight ? (+ <>+ <span>{preText}</span>+ <span style={{position: 'relative', display: 'inline-block'}}>+ <span+ style={{+ position: 'absolute',+ left: 0,+ right: 0,+ top: '50%',+ height: '1.05em',+ transform: `translateY(-50%) scaleX(${highlightScaleX})`,+ transformOrigin: 'left center',+ backgroundColor: COLOR_HIGHLIGHT,+ borderRadius: '0.18em',+ zIndex: 0,+ }}+ />+ <span style={{position: 'relative', zIndex: 1}}>+ {HIGHLIGHT_WORD}+ </span>+ </span>+ <span>{postText}</span>+ </>+ ) : (+ <span>{FULL_TEXT}</span>+ )}+ </div>+ </AbsoluteFill>+ );};diff --git a/packages/skills/src/Root.tsx b/packages/skills/src/Root.tsxindex a6e5d4698a..6f361e4327 100644--- a/packages/skills/src/Root.tsx+++ b/packages/skills/src/Root.tsx@@ -6,7 +6,6 @@ import {MyAnimation,} from '../skills/charts/assets/animated-shapes';import {MyAnimation as BarChartAnimation} from '../skills/charts/assets/bar-chart';-import {MyAnimation as CounterAnimation} from '../skills/example-counter/assets/example';import {MyAnimation as LottieAnimation} from '../skills/lottie/assets/example';import {MyAnimation as TextRotationAnimation} from '../skills/text-animations/assets/text-rotation';import {MyAnimation as TypewriterAnimation} from '../skills/text-animations/assets/typewriter';@@ -32,20 +31,12 @@ export const RemotionRoot = () => {width={1080}height={1080}/>- <Composition- id="Counter"- component={CounterAnimation}- durationInFrames={90}- fps={30}- width={1080}- height={1080}- /><Compositionid="TextRotation"component={TextRotationAnimation}durationInFrames={180}fps={30}- width={1080}+ width={1920}height={1080}/><Composition@@ -69,7 +60,7 @@ export const RemotionRoot = () => {component={TypewriterAnimation}durationInFrames={180}fps={30}- width={1080}+ width={1920}height={1080}/><Compositiondiff --git a/packages/template-prompt-to-motion-graphics/src/examples/code/counter-animation.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/counter-animation.tsdeleted file mode 100644index 5a7009e6f1..0000000000--- a/packages/template-prompt-to-motion-graphics/src/examples/code/counter-animation.ts+++ /dev/null@@ -1,93 +0,0 @@-import { RemotionExample } from "./index";--export const counterAnimationCode = `import { AbsoluteFill, useCurrentFrame, useVideoConfig, interpolate } from "remotion";--export const MyAnimation = () => {- const frame = useCurrentFrame();- const { durationInFrames } = useVideoConfig();-- const metrics = [- { label: "Users", target: 10000, color: "#4f46e5" },- { label: "Revenue", target: 50000, prefix: "$", color: "#10b981" },- { label: "Growth", target: 127, suffix: "%", color: "#f59e0b" },- ];-- const progress = interpolate(- frame,- [0, durationInFrames * 0.7],- [0, 1],- { extrapolateRight: "clamp" }- );-- return (- <AbsoluteFill- style={{- backgroundColor: "#0f0f0f",- justifyContent: "center",- alignItems: "center",- }}- >- <div- style={{- display: "flex",- gap: 60,- }}- >- {metrics.map((metric, i) => {- const staggeredProgress = interpolate(- progress,- [i * 0.15, i * 0.15 + 0.7],- [0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" }- );-- const value = Math.round(metric.target * staggeredProgress);-- return (- <div- key={i}- style={{- textAlign: "center",- opacity: interpolate(staggeredProgress, [0, 0.2], [0, 1]),- transform: \`translateY(\${(1 - staggeredProgress) * 20}px)\`,- minWidth: 200,- }}- >- <div- style={{- fontSize: 72,- fontWeight: "bold",- color: metric.color,- fontFamily: "system-ui, sans-serif",- fontVariantNumeric: "tabular-nums",- }}- >- {metric.prefix || ""}{value.toLocaleString()}{metric.suffix || ""}- </div>- <div- style={{- fontSize: 24,- color: "#888",- marginTop: 8,- fontFamily: "system-ui, sans-serif",- }}- >- {metric.label}- </div>- </div>- );- })}- </div>- </AbsoluteFill>- );-};`;--export const counterAnimationExample: RemotionExample = {- id: "counter-animation",- name: "Counter Animation",- description: "Animated number counters with metrics",- category: "Charts",- durationInFrames: 150,- fps: 30,- code: counterAnimationCode,-};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.tsindex 713b31f0d5..bc40f64ac7 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@@ -1,6 +1,5 @@import { textRotationExample } from "./text-rotation";import { chatMessagesExample } from "./chat-messages";-import { counterAnimationExample } from "./counter-animation";import { histogramExample } from "./histogram";import { progressBarExample } from "./progress-bar";import { animatedShapesExample } from "./animated-shapes";@@ -23,7 +22,6 @@ export interface RemotionExample {export const examples: RemotionExample[] = [textRotationExample,chatMessagesExample,- counterAnimationExample,histogramExample,progressBarExample,animatedShapesExample,diff --git a/packages/template-prompt-to-motion-graphics/src/skills/index.ts b/packages/template-prompt-to-motion-graphics/src/skills/index.tsindex 325197b871..6b81cff1b7 100644--- a/packages/template-prompt-to-motion-graphics/src/skills/index.ts+++ b/packages/template-prompt-to-motion-graphics/src/skills/index.ts@@ -26,12 +26,9 @@ const GUIDANCE_SKILLS = [const EXAMPLE_SKILLS = ["example-histogram","example-progress-bar",- "example-counter","example-text-rotation",- "example-chat-messages","example-falling-spheres","example-animated-shapes",- "example-morphing-hexagons","example-lottie","example-gold-price-chart","example-typewriter-highlight",@@ -58,12 +55,9 @@ const guidanceSkillContent: Record<(typeof GUIDANCE_SKILLS)[number], string> = {const exampleIdMap: Record<(typeof EXAMPLE_SKILLS)[number], string> = {"example-histogram": "histogram","example-progress-bar": "progress-bar",- "example-counter": "counter-animation","example-text-rotation": "text-rotation",- "example-chat-messages": "chat-messages","example-falling-spheres": "falling-spheres","example-animated-shapes": "animated-shapes",- "example-morphing-hexagons": "morphing-hexagons","example-lottie": "lottie-animation","example-gold-price-chart": "gold-price-chart","example-typewriter-highlight": "typewriter-highlight",@@ -116,12 +110,9 @@ Guidance categories (patterns and rules):Code examples (complete working references):- example-histogram: animated bar chart with spring animations and @remotion/shapes- example-progress-bar: loading bar animation from 0 to 100%-- example-counter: animated number counters with multiple metrics- example-text-rotation: rotating words with fade/blur transitions-- example-chat-messages: WhatsApp-style chat bubbles with staggered entrance- example-falling-spheres: 3D bouncing spheres with ThreeJS and physics simulation- example-animated-shapes: bouncing/rotating SVG shapes (circle, triangle, rect, star)-- example-morphing-hexagons: pulsing hexagon grid with color-shifting effects- example-lottie: loading and displaying Lottie animations from URL- example-gold-price-chart: bar chart with Y-axis labels, monthly data, staggered animations- example-typewriter-highlight: typewriter effect with cursor blink, pause, and word highlight