prettymuchbryce / easystarjs

An asynchronous A* pathfinding API written in Javascript.
MIT License
1.9k stars 165 forks source link

Enable L-R diagonal only and disable R-L diagonal #71

Open johnhorsema opened 5 years ago

johnhorsema commented 5 years ago

My grid is a hexagonal grid, so the traversal is different from square grid. As illustrated below:

0R67b

I want to disable R-L diagonal traversal but can't find via the API. I would have to call . setDirectionalCondition to every cell in the grid which would degrade performance of my app.

Can an option be added to enable/disable L-R and R-L diagonals directly from the options?