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

Add 'origin' property to HexJSON format #21

Open
sb-o opened this issue Jun 22, 2024 · 1 comment
Open

Add 'origin' property to HexJSON format #21

sb-o opened this issue Jun 22, 2024 · 1 comment

Comments

@sb-o
Copy link

sb-o commented Jun 22, 2024

Currently the HexJSON format does not specify where the origin for the offset coordinate system is, and the documentation assumes that it will be at the bottom left, with the row number increasing from bottom to top).

image

However, many packages follow the offset coordinate system set out on the Red Blob Games blog, which places the origin at the top left, with r values increasing from top to bottom.

image

Could we add an 'origin' property into the specification, supporting the values "topLeft", "bottomLeft", "topRight", "bottomRight"?

This way, the file can specify which offset coordinate system has been used to compute the q and r values, and we can avoid issues where hexmaps are rendered the wrong way around when using a renderer that defaults to a different origin?

@slowe
Copy link
Member

slowe commented Jul 18, 2024

Thanks for letting me know. I'm not aware of any existing HexJSON files that use anything other than bottomLeft as the direction of the origin.

Yes, this could potentially be added. Adding it will mean that there is no HexJSON renderer in existence that can deal with the full specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants