Skip to main content

resetPath()v3.3.40

Part of the @remotion/paths package.

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.

reset-path.ts
import { resetPath } from "@remotion/paths"; 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.

Compatibility​

BrowsersServersEnvironments
Chrome
Firefox
Safari
Node.js
Bun
Serverless Functions

See also​