New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

inkbrush

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inkbrush

generating traditional inkbrush style SVG paths

latest
Source
npmnpm
Version
1.2.5
Version published
Maintainers
1
Created
Source

inkbrush

A NPM package for generating traditional inkbrush style SVG paths.

Installation

npm i inkbrush

Usage

Simply call the exported function with your parameters. It returns an SVG path. Either write it to file inside an SVG or use it in a frontend environment.

import { generateInkbrush } from 'inkbrush'

const svgInkbrushPath = generateInkbrush({
    viewbox,
    points: [
      { x: 253.685, y: 98.026 },
      { x: 496.162, y: 269.186 },
      { x: 321.248, y: 430.587 }
    ],
    strokeWidths: [{
      breakpoint: 0,
      strokeWidth: 1
    }, {
      breakpoint: 0.5,
      strokeWidth: 10
    }, {
      breakpoint: 1,
      strokeWidth: 1
    }],
    end: {
      numSpikes: 10,
      maxSpikeSize: 1,
      minSpikeSize: 1
    },
    bend: 0.5
  })

Keywords

ink

FAQs

Package last updated on 09 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts