Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/natescarlet/svg-variable-width-line
- Owner: NateScarlet
- License: mit
- Created: 2019-08-16T13:46:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-11T18:22:14.000Z (about 2 months ago)
- Last Synced: 2024-11-11T19:27:30.048Z (about 2 months ago)
- Topics: path, stroke, svg
- Language: TypeScript
- Homepage:
- Size: 1.07 MB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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: '' }
```