# svg-path-commander

> 🛹 Modern TypeScript tools for SVG

Latest version **2.4.0** (published 2026-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install svg-path-commander
pnpm add svg-path-commander
yarn add svg-path-commander
bun add svg-path-commander
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.4.0 |
| Published | 2026-11-24 |
| First published | 2020-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 304 |
| Author | thednp |
| Maintainers | thednp |
| Keywords | absolute, commander, convert, curve, intersect, normalize, optimize, parse, path, relative, reverse, svg, transform3d, typescript |

## Links

- npm: https://www.npmjs.com/package/svg-path-commander
- Repository: https://github.com/thednp/svg-path-commander
- Homepage: http://thednp.github.io/svg-path-commander
- Issues: https://github.com/thednp/svg-path-commander/issues
- npm.io page: https://npm.io/package/svg-path-commander

## Dependencies (1)

- [@thednp/dommatrix](https://npm.io/package/@thednp/dommatrix.md) ^3.1.4

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.4.0 (latest) — 2026-11-24
- 2.3.5 — 2026-11-16
- 2.3.4 — 2026-11-15
- 2.3.3 — 2026-09-02
- 2.3.2 — 2026-09-02
- 2.3.1 — 2026-08-05
- 2.3.0 — 2026-08-04
- 2.2.4 — 2026-08-04
- 2.2.3 — 2026-08-04
- 2.2.2 — 2026-08-03
- 2.2.1 — 2026-04-06
- 2.2.0 — 2026-04-06
- 2.1.11 — 2025-05-29
- 2.1.10 — 2025-02-06
- 2.1.9 — 2025-02-05
- … 104 more at https://npm.io/package/svg-path-commander/versions

## README

# SVGPathCommander

[![Coverage Status](https://coveralls.io/repos/github/thednp/svg-path-commander/badge.svg)](https://coveralls.io/github/thednp/svg-path-commander)
[![ci](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/svg-path-commander/actions/workflows/ci.yml)
[![NPM Version](https://img.shields.io/npm/v/svg-path-commander.svg)](https://www.npmjs.com/package/svg-path-commander)
[![JSR Version](https://img.shields.io/jsr/v/@thednp/svg-path-commander.svg)](https://jsr.io/@thednp/svg-path-commander)
[![NPM Downloads](https://img.shields.io/npm/dm/svg-path-commander.svg)](http://npm-stat.com/charts.html?svg-path-commander)
[![jsDeliver](https://img.shields.io/jsdelivr/npm/hw/svg-path-commander)](https://www.jsdelivr.com/package/npm/svg-path-commander)

![image](./docs/assets/SVGPathCommander.svg)

A modern set of TypeScript tools for manipulating the `d` (description) attribute for _SVGPathElement_ items. The library provides a modern JavaScript-style API for reusable path strings with high-fidelity geometry; coordinates are rounded to four decimals by default, or left exact with `round: "off"`. In addition, you have a powerful tool to convert other SVG shapes like `<circle>` or `<rect>` to `<path>`.

While you may find familiar tools inside, this library brings _**new additions**_:

- the build in `getBBox`, `getPointAtLength` and `getTotalLength` are more reliable and much more accurate than the native methods, not to mention their high [performance](https://github.com/thednp/svg-path-commander/issues/44) ratings;
- thanks to the community contributions we've implemented useful tools like `getPropertiesAtLength`, `getSegmentOfPoint` or `isPointInStroke`;
- `getPropertiesAtLength` returns the frame of the path at a given length — the point, the unit tangent vector, the unit normal vector and the angle of the tangent in degrees;
- `simplifyPath` reduces straight-line runs with Douglas-Peucker and fits curve runs with fewer cubic Béziers, preserving arcs and original curves when fitting would not reduce the segment count;
- `resamplePath` distributes the points of every sub-path along its own length, keeps the source segment boundaries and corners when the requested count allows it, and never connects two sub-paths;
- `offsetPath` offsets a path along its normals, with the joins and the caps of a stroke, so a path can be expanded or outlined;
- `isPointInPath` tells if a point is inside a filled shape, with the `nonzero` and the `evenodd` fill rules of the SVG `fill-rule` attribute;
- `isPointInStroke` tells if a point is along a path, or inside the band a stroke paints around it when you give it a width;
- `equalize` brings two paths to the same shape, so they can be morphed into each other;
- a tool that can _reverse path draw direction_ without altering path commands, even with specific shorthand path commands;
- a unique tool that can _reverse path draw direction_ for path strings with only 'C' path commands;
- a new and unique tool to _apply transform functions to path commands_ via the modern _DOMMatrix_ API;
- the geometry queries read a shared length table, so `getPropertiesAtLength`, `getPointAtLength` and the closest point search are linear in the number of segments instead of quadratic — a 4 000 segment path answers a length query in about half a millisecond and a closest point query in under two milliseconds;
- the library has two entry points: the main entry holds the class and its static methods, while the tree-shakeable utility entry holds every standalone tool, including the morphing and intersection engines;
- every tool has a defined answer for an empty or malformed path, and the copy-based path tools leave the source path unchanged.

**The key differences with other libraries**:

- Typescript sourced with modernized codebase, all inherited codebase has been modernized as well;
- along with the modern codebase, the library also comes with strong TypeScript definitions;
- this library can create 3D to 2D projections, making your SVGs look like 3D but in the SVG coordinate system;
- you can use this library in both web apps and Node.js, you are not restricted to a single environment;
- path command transformations are all consistent with the SVG coordinates system, where others compute transform origin only for rotation transformation.

**SVGPathCommander** can use the [DOMMatrix API](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix) for _SVGPathElement_ path command transformation and implements a very fast and modernized [DOMMatrix shim](https://github.com/thednp/dommatrix).
There are a couple of good reasons for this implementation:

- _WebKitCSSMatrix_ and _SVGMatrix_ APIs are slowly pushed away by DOMMatrix, the green light for new and modern implementations;
- we can actually apply a [3D transformation](https://github.com/ndebeiss/svg3d) matrix to SVG path commands, by calculating a 2D projection of the actual shape in 3D coordinates;
- when most tools available will be rendered absolete, we are ready for new challenges.

This library is available on [CDN](https://www.jsdelivr.com/package/npm/svg-path-commander), [npm](https://www.npmjs.com/package/svg-path-commander) and [JSR](https://jsr.io/@thednp/svg-path-commander).

<!-- BENCH:start -->

# Performance

A comparison of **SVGPathCommander** with the [SvgPath](https://github.com/fontello/svgpath) library v2.6.0 and its [svg-path-bbox](https://github.com/fontello/svg-path-bbox) helper v2.1.0, run with `vpr bench` against a sample path with `11650` path segments. All values are in **milliseconds**, reported as the **median** and the **best** of 30 runs after 5 warmups; lower is better. The `vs svgpath` column is the median ratio of SVGPathCommander to svgpath.

`transform2d` uses `{ scale: 0.8 }`, `transform3d` uses `{ rotate: [15, 15, 30] }`. [SvgPath](https://github.com/fontello/svgpath) only supports 2D transforms, so `transform3d` is marked `n/a` for it.

## Static methods

| Operation   | SVGPathCommander median | SVGPathCommander best | svgpath median | svgpath best | vs svgpath |
| ----------- | ----------------------- | --------------------- | -------------- | ------------ | ---------- |
| parse       | **5**                   | 4.7                   | 8.9            | 8.9          | **0.6x**   |
| bbox        | **4.4**                 | 4.3                   | 6.2            | 6            | **0.7x**   |
| transform2d | **1.2**                 | 1.1                   | 1.3            | 1.2          | **0.9x**   |
| transform3d | **12.4**                | 11.2                  | n/a            | n/a          | n/a        |
| string      | **3**                   | 2.9                   | 3.8            | 3.1          | **0.8x**   |

## Instance methods

| Operation   | SVGPathCommander median | SVGPathCommander best | svgpath median | svgpath best | vs svgpath |
| ----------- | ----------------------- | --------------------- | -------------- | ------------ | ---------- |
| parse       | **4.7**                 | 4.7                   | 8.9            | 8.9          | **0.5x**   |
| bbox        | **4.3**                 | 4.3                   | 6.2            | 6            | **0.7x**   |
| transform2d | **0.7**                 | 0.6                   | 1.3            | 1.2          | **0.6x**   |
| transform3d | **7.5**                 | 6.8                   | n/a            | n/a          | n/a        |
| string      | **1.2**                 | 1.2                   | 3.8            | 3.1          | **0.3x**   |

Last benchmark run on `2026-11-23`. Generated by [`scripts/bench.js`](scripts/bench.js); update with `vpr bench --write`.

<!-- BENCH:end -->

# Install

```sh
npm install svg-path-commander
# or pnpm add svg-path-commander
# or bun add svg-path-commander
# or deno add npm:svg-path-commander
# or deno add jsr:@thednp/svg-path-commander
# or npx jsr add @thednp/svg-path-commander
```

In a Deno project, install from [JSR](https://jsr.io/@thednp/svg-path-commander) and import the raw TypeScript source directly:

```ts
import SVGPathCommander from "jsr:@thednp/svg-path-commander";
```

# Entry Points

The library ships two entry points, so a bundle only carries the tools it uses:

| Entry point               | Holds                                                                                                                      |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `svg-path-commander`      | the `SVGPathCommander` class, its static methods and the public types                                                      |
| `svg-path-commander/util` | every standalone tool — parsing, conversion, geometry, processing, morphing and intersection — in one tree-shakeable entry |

```ts
import SVGPathCommander from "svg-path-commander";
import { equalize, getPathBBox, pathToCurve, pathsIntersection } from "svg-path-commander/util";
```

The JSR package has the same utility entry: `jsr:@thednp/svg-path-commander/util`.

The main entry holds every engine as a static field, so the class and its static methods always
include the morphing and intersection tools. The utility entry contains the same tools as standalone
functions, and a bundler drops the exports an application does not use:

| You need                              | Import                    |
| ------------------------------------- | ------------------------- |
| the class, with its chainable methods | `svg-path-commander`      |
| standalone tools, without the class   | `svg-path-commander/util` |

# CDN

Version 2.2.0+

```html
<script src="https://cdn.jsdelivr.net/npm/svg-path-commander/dist/index.min.js">
```

Versions before 2.2.0

```html
<script src="https://cdn.jsdelivr.net/npm/svg-path-commander/dist/svg-path-commander.js">
```

# Quick Guide

Flip a path on the X axis:

```js
import SVGPathCommander from "svg-path-commander";

const path = "M0 0L100 0L50 100";

const flippedPathString = new SVGPathCommander(path).flipX().toString();
// result => 'M100 0H0L50 100'
```

Optimize a path string by using the `round` option, to round numbers to 2 decimals and finding shorthand where possible:

```js
const optimizedPathString = new SVGPathCommander(path, { round: 2 }).optimize().toString();
```

Or why not apply a **2D transformation** and even a **3D transformation**:

```js
// a transform object
const transform = {
  translate: 15, // X axis translation
  rotate: 15, // Z axis rotation
  scale: 0.75, // uniform scale on X, Y, Z axis
  skew: 15, // skew 15deg on the X axis
  origin: [15, 0], // if not specified, it will use the default origin value [0, 0]
};
const transformed2DPathString = new SVGPathCommander(path).transform(transform).toString();

// apply a 3D transformation
const transform = {
  translate: [15, 15, 15], // `[15, 15]` would apply a 2D translation, and only `15` for X axis translation
  rotate: [15, 15, 15], // or only "15" for 2D rotation on Z axis
  scale: [0.7, 0.75, 0.8], // or only "0.7" for 2D scale on all X, Y, Z axis
  skew: [15, 15], // or only "15" for the X axis
  origin: [15, 15, 15], // full `transform-origin` for a typical 3D transformation
};
const transformed3DPathString = new SVGPathCommander(path).transform(transform).toString();
```

Access the `bbox` instance property to apply a consistent `transform-origin`:

```js
// apply a 3D transformation with a consistent origin
const transformed3DPath = new SVGPathCommander(path);
const { cx, cy, cz } = transformed3DPath.bbox;
const transform = {
  translate: [15, 15, 15], // `[15, 15]` would apply a 2D translation, and only `15` for X axis translation
  rotate: [15, 15, 15], // or only "15" for 2D rotation on Z axis
  scale: [0.7, 0.75, 0.8], // or only "0.7" for 2D scale on all X, Y, Z axis
  skew: [15, 15], // or only "15" for the X axis
  origin: [cx, cy, cz], // the origin
};
const transformed3DPathString = transformed3DPath.transform(transform).toString();
```

SVGPathCommander comes with a full range of additional static methods, here's how to normalize a path:

```js
const path = "M0 0 H50";

const normalizedPath = SVGPathCommander.normalizePath(path);
// result => [['M', 0, 0], ['L', 50, 0]]
```

Reverse a path:

```js
const path = SVGPathCommander.parsePathString("M0 0 H50");

const reversedPath = SVGPathCommander.reversePath(path);
// result => [['M', 50, 0], ['H', 0]]
```

Export to string:

```js
const myPathString = SVGPathCommander.pathToString([
  ["M", 0, 0],
  ["L", 50, 0],
]);
// result => 'M0 0L50 0'
```

Check a path string validity:

```js
SVGPathCommander.isValidPath(path);
// result => boolean
```

Check if path is a certain kind of `PathArray`:

```js
SVGPathCommander.isAbsoluteArray([
  ["M", 0, 0],
  ["L", 50, 0],
]);
// result => true
```

Use treeshake and create a custom function to apply a 3D transformation using static methods:

```ts
import { parsePathString, getPathBBox, transformPath, pathToString } from "svg-path-commander/util";
import type { PathArray, TransformObject } from "svg-path-commander";

function myTransformFn(pathInput: string | PathArray, transformObject: TransformObject) {
  const path = parsePathString(pathInput);
  const { cx, cy, cz } = getPathBBox(path);

  return pathToString(
    transformPath(path, {
      ...transformObject,
      origin: [cx, cy, cz],
    }),
  );
}
```

In extreme cases where performance is paramount, you can consider the parent SVG `viewBox` attribute to extract a bounding box required for a consistent transform origin.

```ts
// const svgViewBox = document.getElementById('my-svg').getAttribute('viewBox');
const viewBox = "0 0 24 24";

const [x, y, width, height] = viewBox.split(/\s/).map(Number);
const origin = [
  x + width / 2, // CX
  y + height / 2, // CY
  Math.max(width, height) + Math.min(width, height) / 2, // CZ
];

// use this origin for your shape transformation
const myNewString = new SVGPathCommander("M0 0 H50")
  .transform({ rotate: [35, 0, 0], origin })
  .toString();
```

Convert a shape to `<path>` and transfer all non-specific attributes

```js
const myCircle = document.getElementById("myCircle");
SVGPathCommander.shapeToPath(myCircle, true);
```

Alternatively you can create `<path>` from specific attributes:

```js
const myRectAttr = {
  type: "rect",
  x: 25,
  y: 25,
  width: 50,
  height: 50,
  rx: 5,
};

const myRectPath = SVGPathCommander.shapeToPath(myRectAttr);
document.getElementById("mySVG").append(myRectPath);
```

Server-side using `jsdom`:

```js
const { document } = new JSDOM(
  `<html>
  <head></head>
  <body>
    <svg id="mySVG" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
      <rect id="myRect" x="0" width="100" height="100" rx="15" />
    </svg>
  </body>
</html>`,
  {
    pretendToBeVisual: true,
  },
).window;

const myRect = document.getElementById("myRect");
SVGPathCommander.shapeToPath(myRect, true, document);
```

Get the path length:

```js
const myPathLength = SVGPathCommander.getTotalLength("M0 0L50 0L25 50z");
// result => 161.80339887498948
```

Get a point along the path:

```js
const myPoint = SVGPathCommander.getPointAtLength("M0 0L50 0L25 50z", 85);
// result => {x: 34.34752415750147, y: 31.304951684997057}
```

Get the frame of the path at a given length — the point, the unit tangent vector, the unit
normal vector and the angle of the tangent in degrees:

```js
const myFrame = SVGPathCommander.getPropertiesAtLength("M0 0L50 0L25 50z", 85);
// result => { segment: ["L", 25, 50], index: 2, length: 55.90169943749474, lengthAtSegment: 50,
//             point: {x: 34.34752415750147, y: 31.304951684997057},
//             tangent: {x: -0.4472135954999579, y: 0.8944271909999159},
//             normal: {x: -0.8944271909999159, y: -0.4472135954999579},
//             angle: 116.56505117707799 }
```

Get the path bounding box:

```js
const myPathBBox = SVGPathCommander.getPathBBox("M0 0L50 0L25 50z");
// result => {width: 50, height: 50, x: 0, y: 0, x2: 50, y2: 50, cx: 25, cy: 25, cz: 75}
```

Simplify the path, within a tolerance:

```js
const mySimplifiedPath = SVGPathCommander.simplifyPath("M0 0L10 0L20 0L30 0", 1);
// result => [["M", 0, 0], ["L", 30, 0]]
```

Resample every sub-path to a given number of points, distributed along its own length:

```js
const myResampledPath = SVGPathCommander.resamplePath("M0 0L100 0L100 100", 3);
// result => [["M", 0, 0], ["L", 100, 0], ["L", 100, 100]]

const myResampledIcon = SVGPathCommander.resamplePath("M0 0L10 0M20 0L30 0", 2);
// result => [["M", 0, 0], ["L", 10, 0], ["M", 20, 0], ["L", 30, 0]]
```

The `count` is the number of points of every sub-path. The sub-paths stay separate, so resampling
an icon never connects one part of it to another.

Offset the path along its normals — the `side` is literal, the left side is the left
normal of the direction of travel, and the `both` side is the outline of the stroke:

```js
const myOffsetPath = SVGPathCommander.offsetPath("M0 0L100 0", 10);
// result => [["M", 0, 10], ["L", 100, 10]]

const myOutline = SVGPathCommander.offsetPath("M0 0L100 0", 10, { side: "both" });
// result => [["M", 0, 10], ["L", 100, 10], ["L", 100, -10], ["L", 0, -10], ["Z"]]
```

Join two paths into a single path with two sub-paths, and reverse one sub-path of a path:

```js
const myJoinedPath = SVGPathCommander.joinPath("M0 0L100 0", "M0 100L100 100");
// result => [["M", 0, 0], ["L", 100, 0], ["M", 0, 100], ["L", 100, 100]]

const myReversedSubPath = SVGPathCommander.reverseSubPath("M0 0L100 0ZM0 100L100 100", 1);
// result => [["M", 0, 0], ["L", 100, 0], ["Z"], ["M", 100, 100], ["L", 0, 100]]
```

Tell if a point is inside a filled shape — the `nonzero` and the `evenodd` fill rules of the
SVG `fill-rule` attribute are both supported, and a point on the boundary of the shape is
inside of it:

```js
const myHitTest = SVGPathCommander.isPointInPath("M0 0L100 0L100 100L0 100Z", { x: 50, y: 50 });
// result => true
```

Find intersection points between two paths:

```js
const count = SVGPathCommander.pathsIntersection(
  "M0 50C0 0,100 0,100 50",
  "M50 0C100 0,100 100,50 100",
  true,
);
// result => 1

const points = SVGPathCommander.pathsIntersection(
  "M0 50C0 0,100 0,100 50",
  "M50 0C100 0,100 100,50 100",
  false,
);
// result => [{ x: 80.41363825007447, y: 19.586361749925548, t1: 0.7262151274035185, t2: 0.27378487259648177 }]
```

Equalize two paths for morphing (single subpath):

```js
const [eq1, eq2] = SVGPathCommander.equalizeSegments(
  "M0 0L100 0L50 100Z",
  "M0 0L100 0L100 100L0 100Z",
);
// eq1.length === eq2.length — ready for morphing
```

Equalize two paths for morphing (single or multi subpath):

```js
const [eq1, eq2] = SVGPathCommander.equalizePaths(
  "M0 0L100 0L50 100Z",
  "M0 0L100 0L100 100L0 100Z",
  { close: true },
);
// Both paths now have the same number of segments
```

Multi-subpath paths keep their outer contours and holes. Outer contours only match outer contours
and holes only match holes. The paths are reversed as whole paths, so their outer/hole relationships
stay intact, and every unmatched contour receives a placeholder at its own centroid instead of being
dropped. Closed contours keep their `Z` commands by default, open paths stay open, and a mixed pair
is closed on both sides to keep the commands compatible; pass `close: false` to leave both results
open.

Equalize two paths for morphing — the recommended entry point, it picks the right
strategy for the paths, aligns their points and normalizes their winding:

```js
const [eq1, eq2] = SVGPathCommander.equalize("M0 0L100 0L50 100Z", "M0 0L100 0L100 100L0 100Z", {
  strategy: "arcLength",
});
// eq1.length === eq2.length — ready for morphing
```

The `strategy` option decides how the points of the paths are placed: `segment`
(the default) splits the segments of the paths, so the points of the result are
the points of the paths, while `arcLength` distributes the result points along
the path length and keeps the source segment boundaries and corners when the
requested count allows it:

```js
const [eq1, eq2] = SVGPathCommander.equalize("M0 0C50 100 100 100 150 0", "M0 0L150 0L150 100Z", {
  strategy: "arcLength",
  points: 8,
  mode: "curve",
});
// eq1.length === eq2.length === 9 — ready for morphing
```

# WIKI

For developer guidelines and the API reference, head over to the [`wiki/`](wiki/) folder in this repository.

# What Is It For?

- converting and optimizing _SVGPathElement_ for use in third party application; our [KUTE.js](https://github.com/thednp/kute.js) animation engine is using it to process _SVGPathElement_ coordinates for [SVG morphing](https://thednp.github.io/kute.js/svgMorph.html) and [SVG cubic morphing](https://thednp.github.io/kute.js/svgCubicMorph.html);
- animators that work with SVGs and need tools for performing specific path command processing;
- front-end developers looking to spice up the content by combining, splitting or transforming paths;
- font-icon creators can use it in both Node.js and web applications to process, optimize and test their creations.

# Technical Considerations

- the `optimize()` instance method will not merge path segments (for instance two or more cubic-bezier segments into one or more arc segments); however, the script will try to provide shorthand notations where possible, pick the shortest string for each segment, and generally try to deliver the best possible outcome;
- most geometry and transformation tools preserve float values. `pathToString()` and `roundPath()` use 4 decimals by default, while static `optimizePath()` uses 2 decimals by default; e.g. `0.56676` becomes `0.5668` at 4 decimals and `0.57` at 2. Pass `"off"` to `pathToString()` or `roundPath()`, or set `SVGPathCommander.options.round = "off"`, to disable their rounding. An instance created with `{ round: "off" }` keeps exact coordinates in `toString()`, but `optimize()` still uses its 2-decimal optimizer;
- the `getSVGMatrix` utility we developed will always compute the matrix by applying the transform functions in the following order: `translate`, `rotate`, `skew` and `scale`, which is the default composition/recomposition order specified in the W3C draft;
- all 3d transformations as well as skews will convert `A` (arc) path commands to `C` (cubic bezier) due to the lack of resources;
- while converting `A` segments to `C` segments is the shipped behavior, a validated arc-preserving alternative exists: an affine-transformed elliptical arc is still an exact elliptical arc, so `A` segments can be transformed directly via the singular value decomposition of the transformed ellipse shape matrix (radii and rotation from the eigenvalues/eigenvectors of the Gram matrix, sweep flag flipped for negative-determinant matrices). This works for any 2D matrix, and even for 3D matrices whenever the projection is orthographic (default `origin: [0,0,0]` — the `z = 0` plane is untouched by the matrix's z rows/columns, so only the 2x2 submatrix matters); the conversion to `C` is only mathematically required for perspective projections (non-zero `origin` z value or a matrix with perspective), where the arc image is a general conic. See `experiments/transformArc-tested.ts` for the implementation and rationale;
- most tools included with **SVGPathCommander** should work in your Node.js apps, but feel free to report any issue;
- the copy-based path tools leave the source path unchanged; `iterate()` is the explicit exception and updates the path array it receives, while the chainable instance methods intentionally replace the path of their instance;
- other path commands like `R` (catmulRomBezier), `O`, `U` (ellipse and shorthand ellipse) are not present in the current draft and are not supported;
- normalization can mean many things to many people and our library is developed to convert path command values to absolute and shorthand to longhand commands to provide a solid foundation for the main processing tools of our library;
- when compared to the native methods like `SVGPathElement.getTotalLength()` or `SVGPathElement.getPointAtLength()`, the output of our static methods is within a [0.002 - 0.05] margin delta, but from our experience it's proven to be a more consistent outcome.

# Special Thanks

- Dmitry Baranovskiy for his [Raphael.js](https://dmitrybaranovskiy.github.io/raphael/)
- Vitaly Puzrin & Alex Kocharin for their [SvgPath](https://github.com/fontello/svgpath)
- Jürg Lehni & Jonathan Puckey for their [Paper.js](https://github.com/paperjs/paper.js/)
- Andrew Willems for his [awesome guide](https://stackoverflow.com/users/5218951/andrew-willems)
- Mike 'Pomax' Kamermans for his awesome [svg-path-reverse](https://github.com/Pomax/svg-path-reverse), [bezierjs](https://github.com/Pomax/bezierjs) and [bezierinfo](https://pomax.github.io/bezierinfo/)
- Nicolas Debeissat for the inspiration on [svg3d](https://github.com/ndebeiss/svg3d)
- Mike Bostock for his awesome [closestPoint](https://bl.ocks.org/mbostock/8027637)
- James Halliday for his excelent [point-at-length](https://github.com/substack/point-at-length)
- Eric Eastwood for his excelent [svg-curve-lib](https://github.com/MadLittleMods/svg-curve-lib)
- PhET Interactive Simulations for their [kite](https://github.com/phetsims/kite)
- [herrstrietzel](https://github.com/herrstrietzel) for his awesome [svg-pathdata-getbbox](https://github.com/herrstrietzel/svg-pathdata-getbbox)
- a special thanks goes to [@vltansky](https://github.com/vltansky) for fixing tree-shaking in **SVGPathCommander**!

# License

**SVGPathCommander** is released under [MIT Licence](LICENSE).

---
_Source: https://npm.io/package/svg-path-commander · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
