Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
393 stars 71 forks source link

feat(Grid): Improve hexagonal grid support #1378

Closed Kruptein closed 5 months ago

Kruptein commented 5 months ago

Hex grids exist in PA as a grid type.

Outside of the actual rendering of the grid however, nothing in PA actually interacts with hex grids and even worse things like snapping act as if there is a square grid, making it completely useless.

This PR aims to fix most of these issues.

Interactions that relate to the grid (e.g. snapping a shape to the grid, snapping a point to a grid vertex) should now all be fully compatible with all hex types.

Additionally a new shape property "Odd Hex Orientation" has been added that can be toggled in a shape's properties. This is only shown when hex grids are in use and it dictates the orientation of shapes that are evenly-sized.