🎥 Make videos programmatically with React
add some more docs
Jonny Burger75469ac61daa
diff --git a/packages/docs/docs/paths/normalize-path.md b/packages/docs/docs/paths/normalize-path.mdindex d0fa04891d..5f6a3602f6 100644--- a/packages/docs/docs/paths/normalize-path.md+++ b/packages/docs/docs/paths/normalize-path.md@@ -32,4 +32,5 @@ Source code stems mostly from [svg-path-reverse](https://www.npmjs.com/package/s## See also- [`@remotion/paths`](/docs/paths)+- [`reduceInstructions()`](/docs/paths/reduce-instructions)- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/paths/src/normalize-path.ts)diff --git a/packages/docs/docs/paths/reduce-instructions.md b/packages/docs/docs/paths/reduce-instructions.mdindex 12a6c22d33..5c7f271ead 100644--- a/packages/docs/docs/paths/reduce-instructions.md+++ b/packages/docs/docs/paths/reduce-instructions.md@@ -6,15 +6,18 @@ crumb: "@remotion/paths"_Part of the [`@remotion/paths`](/docs/paths) package. Available from v3.3.40_-Takes an array of [`Instruction`](/docs/paths/parse-path)'s and reduces them so the path only consists of `M`, `L`, `C`, `Q` and `Z` instructions.+Takes an array of [`Instruction`](/docs/paths/parse-path)'s and reduces the amount of instruction types them so the path only consists of `M`, `L`, `C`, `Q` and `Z` instructions.++In reverse logic, this function will eliminate all `H`, `V`, `S`, `T`, `A`, `m`, `l`, `h`, `v`, `c`, `s`, `q`, `t`, `a` and `z` instructions.+This is useful if you want to manually edit a path and want to make sure it's as simple as possible.Note that this may result in a longer path.```ts twoslash-import { reduceInstructions } from "@remotion/paths";+import { reduceInstructions, ReducedInstruction } from "@remotion/paths";-const simplified = reduceInstructions([+const simplified: ReducedInstruction[] = reduceInstructions([{ type: "m", dx: 10, dy: 10 },{ type: "h", dx: 100 },]);@@ -27,8 +30,17 @@ const simplified = reduceInstructions([*/```+## `ReducedInstruction` type++If you want a type which includes only reduced instructions, you can import the `ReducedInstruction` type.++```ts twoslash+import { ReducedInstruction } from "@remotion/paths";+```+## See also- [`@remotion/paths`](/docs/paths)- [`parsePath()`](/docs/paths/parse-path)+- [`normalizePath()`](/docs/paths/normalize-path)- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/paths/src/reduce-instructions.ts)