PathFinding.js
A comprehensive path-finding library for grid based games
... to indicate which specific strategies to use. For all path-finders, you may indicate whether diagonal movement is allowed. The default value is false, which means that the path can only go orthogonally. When diagonal movement is enabled, you might want to prevent the path from touching the corners of the occupied grid blocks. This is usually desirable if the objects using the path have physical width and can also move between the grid cells.