Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support irregular hexagons #125

Open
feelingsonice opened this issue Dec 9, 2023 · 3 comments
Open

Support irregular hexagons #125

feelingsonice opened this issue Dec 9, 2023 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@feelingsonice
Copy link

feelingsonice commented Dec 9, 2023

Is your feature request related to a problem? Please describe.
I'm not able to configure for irregular shaped hexagons in HexLayout. Perhaps there is a way, in which case please excuse my ignorance and point me in the right direction :)

Describe the solution you'd like
A way to support irregular shaped hexagons.


EDIT:

I see the hex_size field in HexLayout, but since it's a Vec2, I'm guessing it would only support irregular hexagons that, in the "flat top" orientation, have the flat size exactly 1/2 of the over all width?

i.e. how would one support something like this?
Screenshot 2023-12-09 at 10 13 40 AM

@ManevilleF
Copy link
Owner

Screenshot 2023-12-10 at 11 15 50

Chainging the hex_size in the hex_grid example you can set irregular hexagon sizes but they will look scaled and not sliced like your example.
I can look into custom scaling but that doesn't exist yet

@ManevilleF ManevilleF added enhancement New feature or request question Further information is requested labels Dec 10, 2023
@ManevilleF
Copy link
Owner

I worked on this, and it's a headache. Making the hexagons scaled along a vertex is not a problem, the issue comes from adapting the layout which is based on matrix calculations.
Unfortunately I could not figure it out for 0.16 but I think this would make a good addition for a future release

@feelingsonice
Copy link
Author

np, thanks for taking a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants