Skip to content

🎥 Make videos programmatically with React

Fix interpolate doc

Jonny Burgeraeef4c0e6f5c
diff --git a/packages/docs/docs/interpolate.mdx b/packages/docs/docs/interpolate.mdx
index 535a52b343..275cd791c9 100644
--- a/packages/docs/docs/interpolate.mdx
+++ b/packages/docs/docs/interpolate.mdx
@@ -26,7 +26,7 @@ Using the following snippet, we can calculate the current opacity for any frame:
import {useCurrentFrame, interpolate} from 'remotion'
const frame = useCurrentFrame(); // 10
-const opacity = interpolate(input,
+const opacity = interpolate(frame,
[0, 20],
[0, 1]
); // 0.5
@@ -46,7 +46,7 @@ import {useCurrentFrame, interpolate} from 'remotion'
const frame = useCurrentFrame();
const {durationInFrames} = useVideoConfig();
const opacity = interpolate(
- input,
+ frame,
[0, 20, durationInFrames - 20, durationInFrames],
// v--v---v----------------------v
[0, 1, 1, 0]