blender-motion-state-inspection
AFaffaan-m/ECC279k3,369 new stars in the last 7 days
Use this skill when the user asks about creating videos with React, Remotion framework, programmatic video generation, video animations, or needs help with Remotion projects
You are an expert in Remotion, the React framework for creating videos programmatically. Help users build video projects following best practices.
Remotion gives you a frame number and a blank canvas. You render anything you want using React components, but instead of rendering UI to a browser, Remotion renders frames to a canvas.
useCurrentFrame()
const frame = useCurrentFrame();interpolate()
interpolate(frame, [0, 100], [0, 1])# Requires Node.js 16+ or Bun 1.0.3+
npx create-video@latest
npm start
The studio will open on port 3000 with a visual editor for your compositions.
⚠️ Critical: The <Player> should NOT be re-rendered every time updates occur.
Do this:
// Render controls and UI as siblings to the Player
// Pass a ref to the player as a prop
function VideoApp() {
const playerRef = useRef(null);
return (
<>
<Player ref={playerRef} component={MyComp} />
<Controls playerRef={playerRef} />
</>
);
}
Don't do this:
// ❌ Avoid re-rendering Player on every state change
function VideoApp() {
const [currentFrame, setCurrentFrame] = useState(0);
return <Player component={MyComp} frame={currentFrame} />;
}
When using lazyComponent, wrap it in useCallback() to avoid constant re-rendering:
const MyLazyComponent = useCallback(() => {
return lazyComponent(() => import('./MyComponent'));
}, []);
Basic Frame-based Animation:
import { useCurrentFrame, interpolate } from 'remotion';
export const MyComponent = () => {
const frame = useCurrentFrame();
// Fade in over 30 frames
const opacity = interpolate(frame, [0, 30], [0, 1], {
extrapolateRight: 'clamp',
});
return <div style={{ opacity }}>Hello World</div>;
};
Position Animation:
const translateY = interpolate(
frame,
[0, 60],
[100, 0],
{ extrapolateRight: 'clamp' }
);
return (
<div style={{ transform: `translateY(${translateY}px)` }}>
Sliding text
</div>
);
delayRender() and continueRender() for async operationsstaticFile() for local assetsimport { Composition } from 'remotion';
export const RemotionRoot = () => {
return (
<>
<Composition
id="MyVideo"
component={MyVideo}
durationInFrames={150}
fps={30}
width={1920}
height={1080}
/>
</>
);
};
import { Sequence, Series } from 'remotion';
// Show components in parallel at different times
<Sequence from={0} durationInFrames={60}>
<Scene1 />
</Sequence>
<Sequence from={30} durationInFrames={60}>
<Scene2 />
</Sequence>
// Show components one after another
<Series>
<Series.Sequence durationInFrames={60}>
<Scene1 />
</Series.Sequence>
<Series.Sequence durationInFrames={60}>
<Scene2 />
</Series.Sequence>
</Series>
interpolate() correctlyextrapolateRight: 'clamp' to prevent values from going beyond rangeRemotion has a special license. For commercial use, you may need to obtain a company license. Check the official documentation for details.
AFaffaan-m/ECC279k3,369 new stars in the last 7 days
Generate flow fields and particle systems with p5.js, using seeded randomness for original algorithmic art.
ANanthropics/skills181k958 new stars in the last 7 days
ANanthropics/skills181k958 new stars in the last 7 days
SHShubhamsaboo/awesome-llm-apps142k737 new stars in the last 7 days
HAharry0703/MoneyPrinterTurbo131k1,423 new stars in the last 7 days
PApaperclipai/paperclip102k2,528 new stars in the last 7 days