Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/natescarlet/svg-variable-width-line

Create svg path with each point can have variable width.
https://github.com/natescarlet/svg-variable-width-line

path stroke svg

Last synced: about 2 months ago
JSON representation

Create svg path with each point can have variable width.

Awesome Lists containing this project

README

        

# SVG Variable width line

[![npm package](https://img.shields.io/npm/v/svg-variable-width-line)](https://www.npmjs.com/package/svg-variable-width-line)
[![Build Status](https://img.shields.io/circleci/project/github/NateScarlet/svg-variable-width-line.svg)](https://circleci.com/gh/NateScarlet/svg-variable-width-line)

Create svg `path` with each point can have variable width.

Can create line with `PointerEvent.pressure`.

[Demo](https://natescarlet.github.io/svg-variable-width-line/)

```javascript
import * as svgVariableWidthLine from 'svg-variable-width-line';

svgVariableWidthLine.compute({
points: [{ x: 0, y: 0, w: 1 }, { x: 1, y: 0, w: 0 }],
});
// { d: '' }
```