d3-circleCollision
Circle collision detection for D3
Installing
NPM
run npm install d3-circleCollision
const d3CircleCollision = ;
CDN
https://cdn.jsdelivr.net/npm/d3-circle-collision@1.0.0/dist/d3-circleCollision.min.js
Download
Download the latest release.
API Reference
# circleCollision(circles, hide)
takes in a selection of circles and whether the old circles should be hidden or not and returns an array of objects. Each object in the array represents a group in which the circles collide and contains the collision coordinates and the combined data in the form of an array of the collided circles.