Replies: 1 comment 1 reply
-
Try this: Grid(Hex(0,0), Hex(1,0), Hex(2,0), Hex(3,0)).forEach(hex => { or shorter: Grid([0,0], [1,0], [2,0], [3,0]).forEach(hex => { |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have been traversing many different Hex libraries. This one seems to be the most complete and best documented. But I am still failing. I am trying to output a hexgrid from a database which stores the hexes as x/y coordinates (cartesian). I want generate the grid with Honeycomb and output it by using PixiJS.
To test it I wanted to just have several hexes in one line next to each other to see how the coordinate system works. So, using the sample code from the documentation, I did this:
The key being this line:
I was just hoping to get 4 horizontal hexes following the cartesian coordinate system, but I get just one (or probably 4 drawn on top of each other). What am I not understanding?
If I understand how this works, generating the rest from the database should be not that much of an issue... I hope. :-)
Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions