Create hex grids easily, in node or the browser.
e08bc46
add, update and remove several Grid methodsfbac697
add some methods to Gridf74f0d9
add completeCubeCoordinates() function0db7e22
add translate() function442e723
add pixelWidth and pixelHeight getters to Grid6b29a12
Hex is now a class5825ff0
update grid-related code to use Hex class6fc63cb
rename functions and add utile3cafe0
Hex's toString() returns constructor nameb369f1b
hexes now only have q and r in the instance46ab7f2
grids now also accept iterables of coordinates6acb7e7
make `hexPrototype` public in `Grid`97e2838
add static `settings` prop to `Hex` (Issues: #86
)38daeb0
fix Grid's traverse() (Issues: #84
)5b6f730
fix releaseb5a3895
another attempt to fix the release8f09aa4
actually build the project in ci 🥲921726d
don't add /dist to git 🫤8115d61
use prepare hook for husky8e5d2b3
a spiral's radius now excludes the center3ed0fa5
fix bug in pointToHex()[...grid]
or for (const hex of grid) {})
) (c142a68)this
is now correctly typed (8df5488), closes 1#comment116992054_66162731
createHexPrototype()
(2c53678)start
and at
option, only either or none (XOR) (231acf6)start
coordinates it now excludes its first hex
(the cursor, usually { q: 0, r: 0 }
). In other words: you probably want to pass start
coordinates when using rectangle()direction
, length
, at
and start
.grid.each(inStore())
, after change: grid.each(inStore)
). Remove
setStore() because it's ambiguous how the store should be set: hexes could be removed/added/updated
from the store.