-
Notifications
You must be signed in to change notification settings - Fork 0
Changelog
Sascha Klatt edited this page Mar 3, 2018
·
32 revisions
- Plugin API !!!
- You can now add custom functions to gridl and mess around with the internal state. Note: all responsibility lies with the plugin creator!
- heavy internal refactoring (every public gridl function is now implemented via a core plugin)
- support for namespaces: functions can be scoped with the name of the plugin
- new
fill()method: similar to map/forEach, but returns the current gridl instance, not a copy- fill all cells with a fixed value:
gridl(data).fill('bam') - fill all cells using a callback function:
gridl(data).fill((v, pos, src) => 'bam')
- fill all cells with a fixed value:
-
data()can also be used as setter now:gridl(data).data(newData) - generators
- moved generators into their own namespace
generators - renamed generators
-
gridl.make()toimport { generators } from gridl; generators.makeGridl(); -
gridl.makeGrid()toimport { generators } from gridl; generators.makeDataGrid() -
gridl.makeList()toimport { generators } from gridl; generators.makeDataList()
-
- moved generators into their own namespace
- constants
- moved constants into their own namespaces:
adjacencesanddirections -
gridl.adjacencesis not supported anymore - useimport { adjacences } from 'gridl'instead -
gridl.directionsis not supported anymore - useimport { directions } from 'gridl'instead
- moved constants into their own namespaces:
- removed
setValue()andsetValueAt(), they are now fully replaced byvalue()andvalueAt() - renamed mirror functions
-
mirrorX()toflipX() -
mirrorY()toflipY()
-
- don't throw error when
walk()outside the grid - integrated tutorials into JSDoc
- added reduceArea() and reduceAreaAt() functions
- added more predefined adjacence sets
- adjacences.ALL_CW
- adjacences.ALL_CCW
- adjacences.DIAGONAL_CW
- adjacences.DIAGONAL_CCW
- adjacences.HORIZONTAL_CW
- adjacences.HORIZONTAL_CCW
- made all adjacence and direction constants immutable
- implemented reduce() method
- added a changelog :)