0.1.0 • Published 5 years ago

dortmund v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

dortmund

build status

randomly generate rectangles on a grid

Installation

$ npm install dortmund

API

dortmund(options) ⇒ Array

Randomly generate rectangles on a grid

Kind: global function Returns: Array - Array of rectangles, to be converted to svg with dainty

ParamTypeDefaultDescription
optionsObjectConfiguration options
options.amountOfRectanglesnumberThe amount of rectangles to generate
options.maxSvgWidthnumberThe width of the svg canvas
options.maxSvgHeightnumberThe height of the svg canvas
options.rectWidthnumberThe width of the rectangles to generate
options.rectHeightnumberThe height of the rectangles to generate
options.getXnumberThe function that will generate a random x-coordinate, receives all options
options.getYnumberThe function that will generate a random y-coordinate, receives all options
options.rectAttributesObject{}Optional attributes to add to the rectangle element

License

MIT

0.1.0

5 years ago