Skip to content

A Parcel transformer to rough up SVGs using Rough.js.

License

Notifications You must be signed in to change notification settings

thewilkybarkid/parcel-transformer-rough-svg

Repository files navigation

parcel-transformer-rough-svg

A Parcel transformer to rough up SVGs using Rough.js (and rougher).

Installation

Add the library as a dependency:

npm install --save-dev parcel-transformer-rough-svg

Add the library to your .parcelrc file:

{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.svg": ["...", "parcel-transformer-rough-svg"]
  }
}

Usage

Add a roughness query string parameter to your SVG paths, for example:

<img src="image.svg?roughness=0.75" />