🎥 Make videos programmatically with React
document reset-path
Jonny Burger8be9aebc0a86
diff --git a/packages/docs/docs/paths/get-bounding-box.md b/packages/docs/docs/paths/get-bounding-box.mdindex 1e18e40933..853eedeaf9 100644--- a/packages/docs/docs/paths/get-bounding-box.md+++ b/packages/docs/docs/paths/get-bounding-box.md@@ -15,7 +15,7 @@ import { getBoundingBox } from "@remotion/paths";const boundingBox = getBoundingBox("M 35,50 a 25,25,0,1,1,50,0 a 25,25,0,1,1,-50,0");-// {x1: 35, x2: 85, y1: 24.999999999999993, y2: 75};+// { x1: 35, x2: 85, y1: 24.999999999999993, y2: 75 };```This function will throw if the SVG path is invalid.diff --git a/packages/docs/docs/paths/reset-path.md b/packages/docs/docs/paths/reset-path.mdindex b778fe267c..8b284f3527 100644--- a/packages/docs/docs/paths/reset-path.md+++ b/packages/docs/docs/paths/reset-path.md@@ -5,14 +5,12 @@ crumb: "@remotion/paths"_Part of the [`@remotion/paths`](/docs/paths) package. Available from v3.3.40_-Translates an SVG path so that the top-left corner of the bounding box is at `0,0`. Useful for simplifying the math when transforming the coordinates of an SVG path.+Translates an SVG path so that the top-left corner of the [bounding box](/docs/paths/bounding-box) is at `0, 0`. Useful for simplifying the math when transforming the coordinates of an SVG path.```tsx twoslash title="reset-path.ts"-import { getBoundingBox, resetPath } from "@remotion/paths";+import { resetPath } from "@remotion/paths";-const newPath = resetPath("M 35,50 a 25,25,0,1,1,50,0 a 25,25,0,1,1,-50,0");-const { x1, y1 } = getBoundingBox(newPath);-// {x1: 0, x2: 0};+const newPath = resetPath("M 10 10 L 20 20"); // M 0 0 L 10 10```This function will throw if the SVG path is invalid.