lowlighter / astar

🗺️ A JavaScript implementation of A* algorithm.
MIT License
32 stars 4 forks source link

Prevent stack size issues when using larger grid sizes. #2

Closed NoiSek closed 7 years ago

NoiSek commented 7 years ago

This resolves an issue where creating a grid from an array would cause the browser to exceed the callstack with sufficiently large grid sizes.

Fixes this error: Uncaught (in promise) RangeError: Maximum call stack size exceeded

NoiSek commented 7 years ago

This PR appears to cause issues with path generation.

NoiSek commented 7 years ago

Adding a setTimeout() seems to cause a node's connectivity to return positive values where the connectivity would normally be 0.

lowlighter commented 7 years ago

I added your fixes in the master branch and credited you for it. I'm not merging because I forgot to git ignore folders that'll be updated each time project is rebuild locally.

Thanks for your contribution.