Skip to content

🎥 Make videos programmatically with React

refine docs and add table of contents

Jonny Burgerda53a0c22d19
diff --git a/packages/docs/components/MotionBlurExample/MotionBlurExample.tsx b/packages/docs/components/MotionBlurExample/MotionBlurExample.tsx
index cb0ce7b10b..6bba24d568 100644
--- a/packages/docs/components/MotionBlurExample/MotionBlurExample.tsx
+++ b/packages/docs/components/MotionBlurExample/MotionBlurExample.tsx
@@ -174,7 +174,7 @@ export const MotionBlurExample: React.FC = () => {
<input
type="range"
min={0}
- max={4}
+ max={2}
step={0.1}
value={lagInFrames}
style={{ width: 90, marginRight: 8, padding: 8 }}
diff --git a/packages/docs/components/TableOfContents/motion-blur.tsx b/packages/docs/components/TableOfContents/motion-blur.tsx
new file mode 100644
index 0000000000..84586f7085
--- /dev/null
+++ b/packages/docs/components/TableOfContents/motion-blur.tsx
@@ -0,0 +1,16 @@
+import React from "react";
+import { Grid } from "./Grid";
+import { TOCItem } from "./TOCItem";
+
+export const TableOfContents: React.FC = () => {
+ return (
+ <div>
+ <Grid>
+ <TOCItem link="/docs/motion-blur/motion-blur">
+ <strong>{"<MotionBlur>"}</strong>
+ <div>Add a motion blur effect to children</div>
+ </TOCItem>
+ </Grid>
+ </div>
+ );
+};
diff --git a/packages/docs/docs/motion-blur/index.md b/packages/docs/docs/motion-blur/index.md
index 640d5e2105..9212b2d0b4 100644
--- a/packages/docs/docs/motion-blur/index.md
+++ b/packages/docs/docs/motion-blur/index.md
@@ -2,7 +2,7 @@
title: "@remotion/motion-blur"
---
-A package providing a higher order component that creates motion blur.
+A high order component that creates a motion blur effect.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -40,6 +40,7 @@ yarn add @remotion/motion-blur
</TabItem>
</Tabs>
+## Components
## License
diff --git a/packages/docs/docs/motion-blur/component.md b/packages/docs/docs/motion-blur/motion-blur.md
similarity index 82%
rename from packages/docs/docs/motion-blur/component.md
rename to packages/docs/docs/motion-blur/motion-blur.md
index f695251728..6922290e28 100644
--- a/packages/docs/docs/motion-blur/component.md
+++ b/packages/docs/docs/motion-blur/motion-blur.md
@@ -1,9 +1,12 @@
---
title: "<MotionBlur>"
+slug: motion-blur
---
import { MotionBlurExample } from "../../components/MotionBlurExample/MotionBlurExample";
+import {TableOfContents} from '../../components/TableOfContents/motion-blur';
+
```twoslash include example
const BlueSquare: React.FC = () => <div></div>
// - BlueSquare
@@ -28,7 +31,7 @@ How many frames each layer is lagging behind the last one. Can also a floating p
### `blurOpacity`
-The `blurOpacity` defines the highest opacity of a layer. The lowest opacity is 0.
+The highest opacity of a layer. The lowest opacity is 0 and layers intbetween get interpolated.
## Example usage
@@ -59,9 +62,13 @@ export const MyComposition = () => {
<MotionBlurExample />
+## Functions
+
+<TableOfContents />
+
## Credits
-Credits to [@UmungoBungo](https://github.com/UmungoBungo) for inventing this technique.
+This technique was invented and first implemented by [@UmungoBungo](https://github.com/UmungoBungo).
## See also
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index d9bd2dfa64..503af77533 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -150,9 +150,7 @@ module.exports = {
type: "doc",
id: "motion-blur/index",
},
- items: [
- "motion-blur/component",
- ],
+ items: ["motion-blur/motion-blur"],
},
{
type: "category",