serializeInstructions()v3.3.40
Part of the @remotion/paths package.
Takes an array of Instruction's and serializes it into an SVG path string.
serialize-instructions.tsimport {serializeInstructions } from "@remotion/paths"; constnewPath =serializeInstructions ([ {type : "M",x : 10,y : 10, }, {type : "L",x : 20,y : 20, }, ]); // M 10 10 L 20 20
This function may throw if the instructions don't match the Instruction type, but it does not explicitly check for invalid input.
Compatibility
| Browsers | Servers | Environments | |||||||
|---|---|---|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | Node.js | Bun | Serverless Functions | ||||