Skip to content

Instantly share code, notes, and snippets.

@Fil
Fil / .block
Last active April 25, 2017 00:01
Not an Ideal Gas
license: gpl-3.0
border: no
scrolling: no
height: 500
@alexmacy
alexmacy / .block
Last active March 7, 2020 03:23
Web Audio Theremin & Oscilloscope
license: mit
@Fil
Fil / .block
Last active February 16, 2018 09:52
CCPD Snowden
license: mit
@steveharoz
steveharoz / .block
Last active May 8, 2024 12:21 — forked from mbostock/.block
d3-force testing ground
license: gpl-3.0
height: 1030
scrolling: yes
@emeeks
emeeks / README.md
Last active January 16, 2020 13:25
d3-bboxCollide

d3-bboxCollide provides bounding box collision detection for d3.forceSimulation. This is useful for label adjustment or rectangular nodes. Each node receives a bounding box array of a top right and bottom left corner of that node relative to its x position. In the case of this dataset, that size is based on the length of the word in the source dataset.

A function for calculating this array based off the data is passed into the d3.bboxCollide function, which is later passed as a "collide" constraint in your force settings.

var collide = d3.bboxCollide(function (d,i) {
    return [[-d.value * 10, -d.value * 5],[d.value * 10, d.value * 5]]
  })
@syntagmatic
syntagmatic / .block
Last active August 1, 2018 07:27
Force Stress Test
license: gpl-3.0
height: 800
border: no
@ludwigschubert
ludwigschubert / .block
Last active July 2, 2018 22:17
kD-tree explorations in D3.js
license: "cc-by-4.0"
height: 500
scrolling: "no"
border: "no"
@monfera
monfera / .block
Last active May 18, 2017 08:16
Collision test with D3 4.0
license: gpl-3.0
@maybelinot
maybelinot / .block
Last active September 2, 2021 07:58
Zoomable Sunburst on d3.js v4
license: gpl-3.0
@kenpenn
kenpenn / .block
Last active June 4, 2018 04:57
D3 Gangnam Style! v4
license: gpl-3.0
height: 600