Thoughts on adding a metadata field to class Hex? #94
Replies: 2 comments 4 replies
-
Could you share some code that shows how you expect the API to look like? So how you would use honeycomb if this feature already existed. Submitting that PR is fine too. I'm don't understand quite yet why you need this. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Would you be able to share said spiral from center? I'm trying to utilise the cube examples from redblob games, but really struggling (it's important in my case that 0,0 is in fact, the center). |
Beta Was this translation helpful? Give feedback.
-
I created a custom traverser which essentially creates a ring spiral from the center, and I wanted to preserve the levels aka the radius of the ring. Subsequently, having this data would save me a lot of time during the render or animation portion.
Here is an example to better illustrate what my coordinates might look like with my metadata:
More broadly speaking, I think it makes sense to have a metadata field to allow users of this library to preserve data. I believe this is especially useful to people who are deriving a set of hexagons based on other data. I hacked this together locally by extending a few classes, and ignoring a few typescript errors, but wanted to see if there was interest in such a feature. If so, I could clean up what I have and put it into a PR.
Beta Was this translation helpful? Give feedback.
All reactions