@remotion/paths
A package providing utility functions for dealing with SVG paths. This package includes code from svg-path-properties
, svg-path-reverse
and d3-interpolate-path
with the following improvements:
- Functional style APIs
- First class Typescript types
- Documentation with examples
- ESM import style
This package has no dependencies, meaning this package can be used without Remotion.
- npm
- pnpm
- yarn
bash
npm i @remotion/paths
bash
npm i @remotion/paths
bash
pnpm i @remotion/paths
bash
pnpm i @remotion/paths
bash
yarn add @remotion/paths
bash
yarn add @remotion/paths
Functions
getLength()
Obtain length of an SVG path
getParts()
Split SVG path into its parts
getPointAtLength()
Get coordinates at a certain point of an SVG path
getTangentAtLength()
Gets tangents
x
and y
of a point which is on an SVG pathreversePath()
Switch direction of an SVG path
normalizePath()
Replace relative with absolute coordinates
interpolatePath()
Interpolates between two SVG paths
evolvePath()
Animate an SVG path
extendViewBox()
Widen an SVG viewBox in all directions
License
MIT