Drag the blob to deform it. Press the shift key to show the underlying force simulation’s nodes and links.
Uses d3-shape‘s line()
and curveBasisClosed()
functions to draw a blob from a graph.
This version tries to prevent the blob from collapsing using polygonHull()
but this results in the removal of points and leads to jumpiness (you see the dragged point getting removed when you hold the shift key and drag it inside the blob). See the version without it for smoother dragging.