PathFinding.js icon indicating copy to clipboard operation
PathFinding.js copied to clipboard

Obtain the matrix from the pathfind grid

Open Bingdom opened this issue 2 years ago • 0 comments

Hi,

I'm currently trying to put the pathfinder onto a worker

We can't copy certain properties like functions over. So something like .clone() will not work

I was wondering if I instead could just pass the grid matrix to the worker.

According to Object.keys(grid), it gave me a nodes key. Unfortunately, It's just a 1D array of positions and walkable areas. Not translatable for the 2D array needed for the grid initialization- which would need to be done manually, which could incur additional overhead. Would be better if the library maintained at least both

I had a look at the source code and this holds true.

It's unfortunate that this project is dead since something like this would be really great.

Bingdom avatar Jun 20 '23 08:06 Bingdom