Skip to content

🎥 Make videos programmatically with React

Fix shine effect preview image

Cursor Agenteb3ca6bad8f3
diff --git a/.agents/skills/add-effect/SKILL.md b/.agents/skills/add-effect/SKILL.md
index 6c31bacf86..7d9826b8cb 100644
--- a/.agents/skills/add-effect/SKILL.md
+++ b/.agents/skills/add-effect/SKILL.md
@@ -295,7 +295,7 @@ const Root: React.FC = () => {
<Composition
id="effects-my-effect-preview"
component={EffectsMyEffectPreview}
- width={1080}
+ width={1280}
height={720}
fps={30}
durationInFrames={1}
@@ -309,10 +309,15 @@ const Root: React.FC = () => {
registerRoot(Root);
```
+Use the same `width` and `height` as the preview component's `CanvasImage`.
+If the preview component uses the shared docs preview image, keep
+`fit="cover"` on `CanvasImage`. Rendering a 16:9 preview component into a
+different aspect ratio can leave black bars in the generated TOC image.
+
Then render from `packages/docs`:
```bash
-npx --no-install --package @remotion/cli remotion still src/remotion/effects-preview-entry.tsx effects-my-effect-preview static/img/effects-my-effect-preview.jpg --overwrite --image-format=jpeg
+bunx remotion still src/remotion/effects-preview-entry.tsx effects-my-effect-preview static/img/effects-my-effect-preview.jpg --overwrite --image-format=jpeg
```
Add the rendered image to `packages/docs/static/img/`, reference it from `table-of-contents.tsx`, and delete the temporary entry point before committing.
diff --git a/packages/docs/static/img/effects-shine-preview.jpg b/packages/docs/static/img/effects-shine-preview.jpg
index 859425dfab..256412e564 100644
Binary files a/packages/docs/static/img/effects-shine-preview.jpg and b/packages/docs/static/img/effects-shine-preview.jpg differ