draw-noise
Draw the output of a noise function on node-canvas and save it as a PNG!
Installation
$ yarn add draw-noise # Or, if you're old-school... $ npm install --save draw-noise
Usage
const drawNoise = const Simplex2 = const path = const simplex = 'seed'const filename = path
API
drawNoise(noiseFn, options)
- noiseFn: A two-dimensional noise function, or an array of two-dimensional noise functions, with a range of [-1, 1] Required
- options:
- width: The width of the image, in pixels. Defaults to
100px
- height: The height of the image, in pixels. Defaults to
100px
- filename: The filename of the image. Can be an absolute or relative path. Defaults to
./noise.png
- width: The width of the image, in pixels. Defaults to