Skip to content

Latest commit

 

History

History
147 lines (105 loc) · 3.95 KB

DOCUMENTATION.md

File metadata and controls

147 lines (105 loc) · 3.95 KB

Classes

Settings
GradientStop
ParkMiller

Functions

generate(settings)String

entry method

generateBatch(settings, n)Array.<String>

entry method

Settings

Kind: global class
Properties

Name Type Description
width number width of the generated SVG image
height number height of the generated SVG image
points number amount of points on the x axis
lines number amount of lines that should be generated
colors Array.<GradientStop> SVG gradient over the x axis

settings.random : ParkMiller

Kind: instance property of Settings

settings.colors : Array.<GradientStop>

Kind: instance property of Settings

GradientStop

Kind: global class

new GradientStop(offset, color)

Param Type Description
offset number gradient offset
color string gradient color.

ParkMiller

Kind: global class

new ParkMiller(seed)

simple Random generator code is based on this gist https://gist.github.com/blixt/f17b47c62508be59987b

Param Type Description
seed number generators seed

parkMiller.nextInt() ⇒ number

returns next random int number

Kind: instance method of ParkMiller

parkMiller.nextFloat() ⇒ number

returns next random float number

Kind: instance method of ParkMiller

parkMiller.nextIntBetween(min, max)

returns next random int between min and max

Kind: instance method of ParkMiller

Param Type
min number
max number

parkMiller.nextFloatBetween(min, max)

returns next random float between min and max

Kind: instance method of ParkMiller

Param Type
min number
max number

generate(settings) ⇒ String

entry method

Kind: global function
Returns: String - Generated SVG image as string

Param Type
settings Settings

generateBatch(settings, n) ⇒ Array.<String>

entry method

Kind: global function
Returns: Array.<String> - An array of generated SVG images as strings

Param Type
settings Settings
n number