# path-interpolation

> interpolation based SVG path

Latest version **1.0.2** (published 2020-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install path-interpolation
pnpm add path-interpolation
yarn add path-interpolation
bun add path-interpolation
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-06-15 |
| First published | 2020-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bastien Robert |
| Maintainers | bastienrobert |
| Keywords | path, interpolation, ease |

## Links

- npm: https://www.npmjs.com/package/path-interpolation
- Repository: https://github.com/bastienrobert/path-interpolation
- Homepage: https://github.com/bastienrobert/path-interpolation#readme
- Issues: https://github.com/bastienrobert/path-interpolation/issues
- npm.io page: https://npm.io/package/path-interpolation

## Dependencies (1)

- [svg-path-properties](https://npm.io/package/svg-path-properties.md) ^1.0.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

- 1.0.2 (latest) — 2020-06-15
- 1.0.1 — 2020-06-15
- 1.0.0 — 2020-06-09

## README

# Path interpolation

Normalized interpolation based on bezier curve specified in SVG path data format. Works on React Native / server environment too.

## Install

With NPM:
`npm i path-interpolation`
`yarn add path-interpolation`

Use Pika (with ESM):

`import pathInterpolation from 'https://cdn.pika.dev/path-interpolation@^1.0.0'`

## How to use

Generate a **tween** function from a **SVG path**:

```js
import pathInterpolation from 'path-interpolation'

const path = 'M0 100C37.5 92 6 18.32 50 50C100 86 68.5 16.5 100 0'

const easing = pathInterpolation(path, {
  points: 300, // more points equals more accuracy
  height: 100, // height of point equals 1
})

easing(0.5) // => 0.48720720410346985
```

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