WebgL shortest path algorithm