There is a simple example: codepen.io/anon/pen/WxONkk
Clicking on the grass you can see that the red square does not move consistently, but by teleports.
I found the following demo on the Internet: http://www.briangrinstead.com/files/astar-original/
And in the demo everything works as it should, but is it possible to apply the technology that is in the demo to my example?
In the canvas example, I have the usual div. Thanks for any help.
Nsteps ... leave a clone of a square at each step that destroys inMmilliseconds - Alexey Shimansky