PathFinding.js
A comprehensive path-finding library for grid based games
...It comes along with an online demo to show how the algorithms execute. (The pathfinding speed is slowed down in the demo). Note that this project only provides path-finding algorithms for 2D space. If you need to work in a 3D environment, then you may use @schteppe's fork. When instantiating path-finders, you may pass in additional parameters 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. ...