-
Notifications
You must be signed in to change notification settings - Fork 0
API
KieranFleckney edited this page Jul 23, 2020
·
3 revisions
The BatteLines object/class is how you interact with the library.
Grid
Grid object. Grid Object Values:
- Rows: Number of rows
- Columns: Number of columns
- Cells: A 2d array of all cell objects in the grid.
Seed
Current Seed. Changing this will not update the seed.
Generate()
Generate the next pattern in the seed.
Draw()
Redraw the current generated pattern
Next()
Calls Generate() then Draw()
Export(option)
Only available for the CanvasRenderer. Will export the current pattern depending on the option provided.
- 0: dataURL
- 1: Download image PNG (Only available in browser)
- 2: Node Buffer of image (Only available in Node)