d3-circle-collision
v1.1.0
Published
circle collision detection for D3
Downloads
3
Maintainers
Readme
d3-circleCollision
Circle collision detection for D3
Installing
NPM
run npm install d3-circleCollision
const d3CircleCollision = require('d3-circleCollision');
CDN
https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-circleCollision.min.js
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/d3-circleCollision.min.js"></script>
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.