svg-variable-width-line
svg-variable-width-line copied to clipboard
Create svg path with each point can have variable width.
SVG Variable width line
Create svg path with each point can have variable width.
Can create line with PointerEvent.pressure.
import * as svgVariableWidthLine from 'svg-variable-width-line';
svgVariableWidthLine.compute({
points: [{ x: 0, y: 0, w: 1 }, { x: 1, y: 0, w: 0 }],
});
// { d: '<Will be path `d` data>' }