ahmedmaknessi/sum-of-parts / .claude/skills/remotion-best-practices
remotion-best-practices
VerifiedRouter for all Remotion skills
remotion-markup/motion-blur.md
View on GitHub# Motion blur
Use `@remotion/motion-blur` for frame-driven motion blur.
Install it with `npx remotion add @remotion/motion-blur`.
`<HtmlInCanvasMotionBlur>` is the state of the art in Remotion for blurring animated HTML. It captures the content at fractional frames and averages its pixels in a canvas.
## `<HtmlInCanvasMotionBlur>`
Available from Remotion 4.0.529.
Supply the canvas `width` and `height`, usually from `useVideoConfig()`.
`shutterAngle` defaults to `180` and accepts `0` to `360`.
`0` disables blur. `samples` defaults to `8` and must be an integer from `1` to `64`. More samples can smooth the blur but increase preview and render cost.
Call `useCurrentFrame()` inside the child component so each sample receives its own frame.
```tsx
import {
HtmlInCanvasMotionBlur,
} from '@remotion/motion-blur';
import {useCurrentFrame, useVideoConfig} from 'remotion';
const MovingBox = () => {
const frame = useCurrentFrame();
return (
<div
style={{
position: 'absolute',
left: frame * 10,
top: 200,
width: 120,
height: 120,
backgroundColor: '#ff6b6b',
}}
/>
);
};
export const HtmlInCanvasBlur = () => {
const {width, height} = useVideoConfig();
return (
<HtmlInCanvasMotionBlur
width={width}
height={height}
samples={8}
shutterAngle={180}
>
<MovingBox />
</HtmlInCanvasMotionBlur>
);
};
```
For live preview, enable HTML-in-canvas in Chrome 149 or later with `chrome://flags/#canvas-draw-element`.
No configuration for rendering is necessary.
Nest `<HtmlInCanvas>` or `<HtmlInCanvasMotionBlur>` components only when `HtmlInCanvas.isNestingSupported()` returns `true` (Chrome 157 or newer with HTML-in-canvas enabled).
If HTML-in-canvas is unavailable, see the [motion blur guide](https://www.remotion.dev/docs/motion-blur) for other options. See the [`<HtmlInCanvasMotionBlur>` reference](https://www.remotion.dev/docs/motion-blur/html-in-canvas-motion-blur) for API details.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |