pattern-generator
v0.0.6
Published
Take a SVG pattern and repeat it on a new SVG Document
Downloads
9
Readme
Pattern Generator
Give one pattern, size and return a SVG string. (Compatible NodeJS only for the moment)
Install
npm install pattern-generator
# -- OR --
yarn add pattern-generator
Import
import patternGenerator from "pattern-generator";
Use
patternGenerator("/path/to/img.png", 1600, 1000);
Options :
patternGenerator("/path/to/img.png", 1600, 1000, {
patternWidth: 500,
patternOffset: { x: 0, y: 0 },
backgroundColor: "#fff",
});