PatrolJS demo

Click anywhere on the level to calculate a path. Click and drag to rotate the level.