Demonstration of how different real-time optimal cost finding approaches can work. This example utilizes d3’s element/node caching, which gives a benefit of drastically reducing the element/node lookup time. This way, no application of select()
or selectAll()
is done to find and filter nodes in the directional vicinity: [(x+k, y), (x, y+k), (x+k, y+k)].