Pave
A library for manipulating SVG/Path2D curves
Functional Programming
All APIs are provided in a functional programming manner, making it easy to compose and transform paths.
Environment Agnostic
Works with any JavaScript environment - Canvas API, SVG, p5.js, Paper.js, etc.
Powerful Features
Create primitives, calculate positions/normals/tangents, offset paths, resample curves, and more.
Pave is a environment-agnostic toolkit specialized for manipulating SVG/Path2D curves, which includes creating primitives, calculating positions/normals/tangents, offsetting, and resampling paths. All of the API are provided in a functional programming manner, and the path data is represented as an immutable plain object.
To try out the library, visit the Sandbox.
Tips
All code blocks with viewer on the right are editable so you can try out the Pave library right here in the documentation.
API
See the full documentation on API.
- Path: The core module for manipulating paths.
- Comamnds
- Arc: The arc (
A
) commands functions. - CubicBezier: The cubic Bezier (
C
) commands functions. - Line: The line-to (
L
) commands functions.
- Arc: The arc (
- Geometries
- Distort: The functions for handling distortions.
- Type Aliases