Skip to content

Instantly share code, notes, and snippets.

@ColinEberhardt ColinEberhardt/.block
Last active Oct 30, 2017

Embed
What would you like to do?
D3 force layout with WebAssembly!
license: mit
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3wasm = {})));
}(this, (function (exports) { 'use strict';
var encoded = "AGFzbQEAAAABTQ5gA39/fwF/YAJ/fwF/YAAAYAF/AX9gAn9/AGAEf39/fwF/YAV/f39/fwF/YAF/AGADf39/AGAAAX9gAX8BfGABfAF8YAJ8fABgAXwAAzAvAAAAAgEEAgMBBwgBAwgBAQAAAAAJAQQHCQkJAQQHCQkBAwEDAgQCCgsLAgwMDQIEBAFwAAAFAwEAAQYrB38BQQQLfwFBAgt/AUEAC38BQQALfwFBAAt/AUEAC3wBRBgtRFT7IQlACweUAhMGbWVtb3J5AgAGbWFsbG9jAAcEZnJlZQAJCU5vZGUucmVhZAAQCk5vZGUud3JpdGUAEQ1Ob2RlTGluay5yZWFkABIOTm9kZUxpbmsud3JpdGUAExJzZXROb2RlQXJyYXlMZW5ndGgAFxJnZXROb2RlQXJyYXlMZW5ndGgAGAxnZXROb2RlQXJyYXkAGRJzZXRMaW5rQXJyYXlMZW5ndGgAHRJnZXRMaW5rQXJyYXlMZW5ndGgAHgxnZXRMaW5rQXJyYXkAHw5yZWFkRnJvbU1lbW9yeQAkDXdyaXRlVG9NZW1vcnkAJg9pbml0aWFsaXplTm9kZXMAKgZjZW50ZXIAKwhtYW55Qm9keQAsBGxpbmsALQgBLgkBAAqJey+1AgEFfwJ/An8CQAJAAkAgAEEHcSIDIAFBB3FGBEBBCCADayEEQQAhAwJAA0AgACADaiEFIAEgA2ohBiADIARPDQEgBS0AACAGLQAARw0DIANBAWohAwwACwALIAIgA2shAkEAIQQCQANAIAJBBEkNASAFIARqKAIAIAYgBGooAgBHDQUgBEEEaiEEIAJBfGohAgwACwALIAEgA2ogBGohASAAIANqIARqIQALQ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UNABogACAFaiAEaiIFIAYgBGoiBCkCADcCACAFQQhqIQcgBEEIagshBCADQQRxBEAgByAEKAIANgIAIARBBGohBCAHQQRqIQcLIANBAnEEQCAHIAQvAAA7AAAgB0ECaiEHIARBAmohBAsgA0EBcUUNAyAHIAQtAAA6AAAgAA8LIAUgASAEaiIOKAIAIgo6AAAgBUEBaiAOQQFqLQAAOgAAIAVBAmogDkECai0AADoAACACIARrQX1qIQggACAJQW8gCUFvSxsgD2pBcHFqIARqQQNqIQtBACEDAkADQCAIQRFJDQEgBSADaiIGQQNqIA4gA2oiDEEEaigCACIHQQh0IApBGHZyNgIAIAZBB2ogDEEIaigCACIKQQh0IAdBGHZyNgIAIAZBC2ogDEEMaigCACIHQQh0IApBGHZyNgIAIAZBD2ogDEEQaigCACIKQQh0IAdBGHZyNgIAIANBEGohAyAIQXBqIQgMAAsACyABIAlBbyAJQW9LGyAPakFwcSIFaiAEakEDaiEDQX0gBWsgAmogBGshDQwBCyAFIAEgBGoiDygCACIJOgAAIAVBAWogD0EBai0AADoAACACIARrQX5qIQggACAKQW4gCkFuSxsgDmpBcHFqIARqQQJqIQtBACEDAkADQCAIQRJJDQEgBSADaiIGQQJqIA8gA2oiDEEEaigCACIHQRB0IAlBEHZyNgIAIAZBBmogDEEIaigCACIJQRB0IAdBEHZyNgIAIAZBCmogDEEMaigCACIHQRB0IAlBEHZyNgIAIAZBDmogDEEQaigCACIJQRB0IAdBEHZyNgIAIANBEGohAyAIQXBqIQgMAAsACyABIApBbiAKQW5LGyAOakFwcSIFaiAEakECaiEDQX4gBWsgAmogBGshDQsgDUEQcQRAIAsgAykAADcAACALIAMpAAg3AAggC0EQaiELIANBEGohAwsgDUEIcQRAIAsgAykAADcAACALQQhqIQsgA0EIaiEDCyANQQRxBEAgCyADKAAANgAAIAtBBGohCyADQQRqIQMLIA1BAnEEQCALIAMvAAA7AAAgC0ECaiELIANBAmohAwsgDUEBcUUNACALIAMtAAA6AAAgAA8LIAALCwuCAwICfwF+An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UaigCAEcNACAAIAI2AggPCwJ/AkACfwJAIAJB/wFNBEAgACACQQN2IgNBA3RqQShqIQIgACgCACIFQQEgA3QiA3FFDQEgAigCCAwCCyACQQh2IgVFDQJBHyACQf///wdLDQMaIAJBDiAFIAVBgP4/akEQdkEIcSIDdCIFQYDgH2pBEHZBBHEiBCADciAFIAR0IgNBgIAPakEQdkECcSIFcmsgAyAFdEEPdmoiA0EHanZBAXEgA0EBdHIMAwsgACAFIANyNgIAIAILIgMgATYCDCACQQhqIAE2AgAgASACNgIMIAEgAzYCCA8LQQALIQMgAUIANwIQIAFBHGogAzYCACAAIANBAnRqQbACaiEFAkACQCAAKAIEIgRBASADdCIGcQRAIAJBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhBANAIAQiBSgCBEF4cSACRg0DIANBHXYhBCADQQF0IQMgBSAEQQRxakEQaiIAKAIAIgQNAAsgACABNgIAIAFBGGogBTYCAAwBCyAAQQRqIAQgBnI2AgAgBSABNgIAIAFBGGogBTYCAAsgASABNgIMIAEgATYCCA8LIAUoAggiAiABNgIMIAUgATYCCCABQRhqQQA2AgAgASAFNgIMIAEgAjYCCAsLC0MBA38CQCABQQBIBEAACyABQQhsIQJBCCACahAHIQMgAyEEIAQgATYCACAEIAE2AgQgA0EIakEAIAIQAhogAw8ACwALQwEDfwJAIAFBAEgEQAALIAFBCGwhAkEIIAJqEAchAyADIQQgBCABNgIAIAQgATYCBCADQQhqQQAgAhACGiADDwALAAtfAAJAIAAgASACIwBsQQhsaisDCDkDACAAIAEgAiMAbEEBakEIbGorAwg5AwggACABIAIjAGxBAmpBCGxqKwMIOQMQIAAgASACIwBsQQNqQQhsaisDCDkDGCAADwALAAtfAAJAIAEgAiMAbEEIbGogACsDADkDCCABIAIjAGxBAWpBCGxqIAArAwg5AwggASACIwBsQQJqQQhsaiAAKwMQOQMIIAEgAiMAbEEDakEIbGogACsDGDkDCCAADwALAAszAAJAIAAgASACIwFsQQRsaigCCDYCACAAIAEgAiMBbEEBakE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RfaG9sZGluZwwJLm1vcmVjb3JlDQ4uZGlzcG9zZV9jaHVuaw4lc3RkOkFycmF5PE5vZGVBcnJheVNlcmlhbGlzZXIgfCBudWxsPg8pc3RkOkFycmF5PE5vZGVMaW5rQXJyYXlTZXJpYWxpc2VyIHwgbnVsbD4QCU5vZGUucmVhZBEKTm9kZS53cml0ZRINTm9kZUxpbmsucmVhZBMOTm9kZUxpbmsud3JpdGUUE25vZGVBcnJheVNlcmlhbGlzZXIVDnN0ZDpBcnJheTxmNjQ+Fh5Ob2RlQXJyYXlTZXJpYWxpc2VyI2luaXRpYWxpc2UXEnNldE5vZGVBcnJheUxlbmd0aBgSZ2V0Tm9kZUFycmF5TGVuZ3RoGQxnZXROb2RlQXJyYXkaF25vZGVBcnJheUxpbmtTZXJpYWxpc2VyGw5zdGQ6QXJyYXk8dTMyPhwiTm9kZUxpbmtBcnJheVNlcmlhbGlzZXIjaW5pdGlhbGlzZR0Sc2V0TGlua0FycmF5TGVuZ3RoHhJnZXRMaW5rQXJyYXlMZW5ndGgfDGdldExpbmtBcnJheSAWc3RkOkFycmF5PE5vZGUgfCBudWxsPiEYTm9kZUFycmF5U2VyaWFsaXNlciNyZWFkIhpzdGQ6QXJyYXk8Tm9kZUxpbmsgfCBudWxsPiMcTm9kZUxpbmtBcnJheVNlcmlhbGlzZXIjcmVhZCQOcmVhZEZyb21NZW1vcnklGU5vZGVBcnJheVNlcmlhbGlzZXIjd3JpdGUmDXdyaXRlVG9NZW1vcnknB2NvbnZlcnQoA3NpbikDY29zKg9pbml0aWFsaXplTm9kZXMrBmNlbnRlciwIbWFueUJvZHktBGxpbmsuBi5zdGFydA==";
function asciiToBinary(str) {
if (typeof atob === 'function') {
return atob(str)
} else {
return new Buffer(str, 'base64').toString('binary');
}
}
function decode(encoded) {
var binaryString = asciiToBinary(encoded);
var bytes = new Uint8Array(binaryString.length);
for (var i = 0; i < binaryString.length; i++) {
bytes[i] = binaryString.charCodeAt(i);
}
return bytes.buffer;
}
var wasmCode = (importObject) => WebAssembly.instantiate(decode(encoded), importObject)
.then(r => r.instance);
// -------------------------------- classes shared between ASC and JS
var Node = (function () {
function Node() {
this.links = 0;
}
Node.read = function (node, buffer, index) {
node.x = buffer[index * Node.size];
node.y = buffer[index * Node.size + 1];
node.vx = buffer[index * Node.size + 2];
node.vy = buffer[index * Node.size + 3];
return node;
};
Node.write = function (node, buffer, index) {
buffer[index * Node.size] = node.x;
buffer[index * Node.size + 1] = node.y;
buffer[index * Node.size + 2] = node.vx;
buffer[index * Node.size + 3] = node.vy;
return node;
};
Node.size = 4;
return Node;
}());
var NodeLink = (function () {
function NodeLink() {
}
NodeLink.read = function (nodeLink, buffer, index) {
nodeLink.sourceIndex = buffer[index * NodeLink.size];
nodeLink.targetIndex = buffer[index * NodeLink.size + 1];
return nodeLink;
};
NodeLink.write = function (nodeLink, buffer, index) {
buffer[index * NodeLink.size] = nodeLink.sourceIndex;
buffer[index * NodeLink.size + 1] = nodeLink.targetIndex;
return nodeLink;
};
NodeLink.size = 2;
return NodeLink;
}());
// -------------------------------- classes that serialize / deserialize the above
var NodeArraySerialiser = (function () {
function NodeArraySerialiser() {
}
NodeArraySerialiser.prototype.read = function () {
var typedArray = new Array(this.count);
for (var i = 0; i < this.count; i++) {
typedArray[i] = Node.read(new Node(), this.array, i);
}
return typedArray;
};
NodeArraySerialiser.prototype.write = function (typedArray) {
for (var i = 0; i < this.count; i++) {
Node.write(typedArray[i], this.array, i);
}
};
NodeArraySerialiser.prototype.initialise = function (count) {
this.array = new Float64Array(count * Node.size);
this.count = count;
};
return NodeArraySerialiser;
}());
// bug: cannot just create a new NodeArraySerialiser()!!!
var node = new Array(1);
node[0] = new NodeArraySerialiser();
function nodeArraySerialiser() {
return node[0];
}
var nodeArray;
function setNodeArrayLength(count) {
nodeArraySerialiser().initialise(count);
}
function getNodeArrayLength() {
return nodeArray.length;
}
function getNodeArray() {
return nodeArraySerialiser().array;
}
var NodeLinkArraySerialiser = (function () {
function NodeLinkArraySerialiser() {
this.count = 0;
}
NodeLinkArraySerialiser.prototype.read = function () {
var typedArray = new Array(this.count);
for (var i = 0; i < this.count; i++) {
typedArray[i] = NodeLink.read(new NodeLink(), this.array, i);
}
return typedArray;
};
NodeLinkArraySerialiser.prototype.initialise = function (count) {
this.array = new Uint32Array(count * NodeLink.size);
this.count = count;
};
return NodeLinkArraySerialiser;
}());
// bug: cannot just create a new NodeArraySerialiser()!!!
var node2 = new Array(1);
node2[0] = new NodeLinkArraySerialiser();
function nodeArrayLinkSerialiser() {
return node2[0];
}
var linkArray;
function setLinkArrayLength(count) {
nodeArrayLinkSerialiser().initialise(count);
}
function getLinkArrayLength() {
return nodeArrayLinkSerialiser().count;
}
function getLinkArray() {
return nodeArrayLinkSerialiser().array;
}
// -------------------------------- maths functions
var PI = 3.141592653589793;
function sin(x) {
while (x < -PI) {
x += PI * 2;
}
while (x > PI) {
x -= PI * 2;
}
var sin;
if (x < 0) {
sin = 1.27323954 * x + .405284735 * x * x;
if (sin < 0) {
sin = .225 * (sin * -sin - sin) + sin;
}
else {
sin = .225 * (sin * sin - sin) + sin;
}
}
else {
sin = 1.27323954 * x - 0.405284735 * x * x;
if (sin < 0) {
sin = .225 * (sin * -sin - sin) + sin;
}
else {
sin = .225 * (sin * sin - sin) + sin;
}
}
return sin;
}
function cos(x) {
return sin(x - PI / 2);
}
// -------------------------------- read / write data form linear memory
function readFromMemory() {
nodeArray = nodeArraySerialiser().read();
linkArray = nodeArrayLinkSerialiser().read();
for (var i = 0; i < linkArray.length; i++) {
var typedLink = linkArray[i];
// resolve the source / target indices to their respective nodes
typedLink.source = nodeArray[typedLink.sourceIndex];
typedLink.target = nodeArray[typedLink.targetIndex];
// update the node link count
typedLink.source.links = typedLink.source.links + 1.0;
typedLink.target.links = typedLink.target.links + 1.0;
}
// compute the bias for each link
for (var i = 0; i < linkArray.length; i++) {
var typedLink = linkArray[i];
typedLink.bias = typedLink.source.links / (typedLink.source.links + typedLink.target.links);
}
}
// TODO: cannot cast integers to floats, the required conversion functions are not exposed
// https://github.com/WebAssembly/design/blob/master/Semantics.md#datatype-conversions-truncations-reinterpretations-promotions-and-demotions
// https://github.com/AssemblyScript/assemblyscript/issues/117#issuecomment-334927010
function convert(v) {
var conversionBuffer = new Float64Array(1);
conversionBuffer[0] = v;
return conversionBuffer[0];
}
function writeToMemory() {
nodeArraySerialiser().write(nodeArray);
}
// -------------------------------- d3 force layout functions
function initializeNodes() {
var initialRadius = 10.0;
var initialAngle = PI * (3.0 - sqrt(5.0));
for (var i = 0; i < nodeArray.length; i++) {
var node_1 = nodeArray[i];
var radius = initialRadius * sqrt(i);
var angle = convert(i) * initialAngle;
node_1.x = radius * sin(angle);
node_1.y = radius * cos(angle);
node_1.vx = 0;
node_1.vy = 0;
}
}
function center(x, y) {
var sx = 0, sy = 0;
for (var i = 0; i < nodeArray.length; i++) {
sx = sx + nodeArray[i].x;
sy = sy + nodeArray[i].y;
}
sx = sx / convert(nodeArray.length) - x;
sy = sy / convert(nodeArray.length) - y;
for (var i = 0; i < nodeArray.length; i++) {
nodeArray[i].x = nodeArray[i].x - sx;
nodeArray[i].y = nodeArray[i].y - sy;
}
}
function manyBody(alpha, strength) {
for (var i = 0; i < nodeArray.length; i++) {
for (var j = 0; j < nodeArray.length; j++) {
if (i != j) {
var nodeOne = nodeArray[i];
var nodeTwo = nodeArray[j];
var dx = nodeTwo.x - nodeOne.x;
var dy = nodeTwo.y - nodeOne.y;
var l = dx * dx + dy * dy;
var w = strength * alpha / l;
// TODO: += doesn't work here!
nodeOne.vx = nodeOne.vx + dx * w;
nodeOne.vy = nodeOne.vy + dy * w;
}
}
}
}
function link(alpha) {
var distance = 30;
for (var i = 0; i < linkArray.length; i++) {
var link_1 = linkArray[i];
var dx = link_1.target.x + link_1.target.vx - link_1.source.x - link_1.source.vx;
var dy = link_1.target.y + link_1.target.vy - link_1.source.y - link_1.source.vy;
var length = sqrt(dx * dx + dy * dy);
var strength = 1 / min(link_1.target.links, link_1.source.links);
var deltaLength = (length - distance) / length * strength * alpha;
dx = dx * deltaLength;
dy = dy * deltaLength;
link_1.target.vx = link_1.target.vx - dx * link_1.bias;
link_1.target.vy = link_1.target.vy - dy * link_1.bias;
link_1.source.vx = link_1.source.vx + dx * (1 - link_1.bias);
link_1.source.vy = link_1.source.vy + dy * (1 - link_1.bias);
}
}
var force = Object.freeze({
setNodeArrayLength: setNodeArrayLength,
getNodeArrayLength: getNodeArrayLength,
getNodeArray: getNodeArray,
setLinkArrayLength: setLinkArrayLength,
getLinkArrayLength: getLinkArrayLength,
getLinkArray: getLinkArray,
readFromMemory: readFromMemory,
writeToMemory: writeToMemory,
initializeNodes: initializeNodes,
center: center,
manyBody: manyBody,
link: link,
Node: Node,
NodeLink: NodeLink
});
var wasm;
var loaded = wasmCode()
.then(function (instance) {
wasm = instance.exports;
return true;
});
var getAdaptedWasmCode = function () {
// TODO: wasm is frozen so we cannot proxy! this is a big hack to allow proxying!!!!!!
var wasm2 = {
sin: wasm.sin,
cos: wasm.cos,
readFromMemory: wasm.readFromMemory,
writeToMemory: wasm.writeToMemory,
initializeNodes: wasm.initializeNodes,
manyBody: wasm.manyBody,
link: wasm.link,
center: wasm.center,
setNodeArrayLength: wasm.setNodeArrayLength,
getNodeArrayLength: wasm.getNodeArrayLength,
getNodeArray: wasm.getNodeArray,
setLinkArrayLength: wasm.setLinkArrayLength,
getLinkArrayLength: wasm.getLinkArrayLength,
getLinkArray: wasm.getLinkArray
};
return new Proxy(wasm2, {
get: function (target, name) {
if (name === 'getNodeArray') {
return function () {
var offset = wasm.getNodeArray();
return new Float64Array(wasm.memory.buffer, offset + 8, wasm.getNodeArrayLength() * Node.size);
};
}
else if (name === 'getLinkArray') {
return function () {
var offset = wasm.getLinkArray();
return new Uint32Array(wasm.memory.buffer, offset + 8, wasm.getLinkArrayLength() * NodeLink.size);
};
}
else {
return target[name];
}
}
});
};
var simulation = function (nodes, useWasm) {
var velocityDecay = 0.6;
var alpha = 1.0;
var alphaMin = 0.001;
var alphaDecay = 1 - Math.pow(alphaMin, 1 / 300);
var alphaTarget = 0;
var forces = [];
var computer = useWasm ? getAdaptedWasmCode() : force;
// execute some WASM code, reading from / writing tolinear memory
var executeWasm = function (wasmCode) {
// write the nodes to the WASM linear memory
var nodeBuffer = computer.getNodeArray();
nodes.forEach(function (node, index) { return Node.write(node, nodeBuffer, index); });
// read the values form linear memory
computer.readFromMemory();
wasmCode();
// write back any updates
computer.writeToMemory();
// read back into the JS node array
nodeBuffer = computer.getNodeArray();
nodes.forEach(function (node, index) { return Node.read(node, nodeBuffer, index); });
};
computer.setNodeArrayLength(nodes.length);
executeWasm(function () {
computer.initializeNodes();
});
var simulation = {};
simulation.tick = function () {
alpha += (alphaTarget - alpha) * alphaDecay;
executeWasm(function () {
forces.forEach(function (force) {
force(alpha);
});
});
nodes.forEach(function (node) {
if (node.fx == null) {
node.x += node.vx;
node.vx *= velocityDecay;
}
else {
node.x = node.fx;
node.vx = 0;
}
if (node.fy == null) {
node.y += node.vy;
node.vy *= velocityDecay;
}
else {
node.y = node.fy;
node.vy = 0;
}
});
return simulation;
};
simulation.force = function (name, force) {
forces.push(force);
force.initialize(computer, nodes);
return simulation;
};
simulation.alphaTarget = function (a) {
alphaTarget = a;
return simulation;
};
simulation.restart = function () {
alpha = 0.0;
return simulation;
};
// this simulation implementation does't support internal timers.
simulation.stop = function () { return simulation; };
return simulation;
};
var manyBody$1 = function () {
var strength = -30;
var computer;
var manyBody = (function (alpha) {
return computer.manyBody(alpha, strength);
});
manyBody.strength = function (s) { return strength = s; };
manyBody.initialize = function (c, n) { computer = c; };
return manyBody;
};
var link$1 = function () {
var nodes;
var links;
var id = function (n) { return n.index; };
var computer;
var initialize = function () {
if (!nodes)
return;
computer.setLinkArrayLength(links.length);
var linkBuffer = computer.getLinkArray();
links.forEach(function (link$$1, index) {
var sourceIndex = nodes.findIndex(function (n) { return id(n) == link$$1.source; });
var targetIndex = nodes.findIndex(function (n) { return id(n) == link$$1.target; });
link$$1.sourceIndex = sourceIndex;
link$$1.targetIndex = targetIndex;
NodeLink.write(link$$1, linkBuffer, index);
link$$1.source = nodes[sourceIndex];
link$$1.target = nodes[targetIndex];
});
};
var link$$1 = (function (alpha) {
computer.link(alpha);
});
link$$1.initialize = function (c, n) {
nodes = n;
computer = c;
initialize();
return link$$1;
};
link$$1.id = function (f) {
id = f;
return link$$1;
};
link$$1.links = function (l) {
links = l;
initialize();
return link$$1;
};
return link$$1;
};
var center$1 = function (cx, cy) {
if (cx === void 0) { cx = 0.0; }
if (cy === void 0) { cy = 0.0; }
var computer;
var center = (function (alpha) {
return computer.center(cx, cy);
});
center.initialize = function (c, n) { computer = c; };
return center;
};
exports.forceSimulation = simulation;
exports.forceManyBody = manyBody$1;
exports.forceLink = link$1;
exports.forceCenter = center$1;
exports.loaded = loaded;
Object.defineProperty(exports, '__esModule', { value: true });
})));
{
"nodes": [
{"id": "Myriel", "group": 1},
{"id": "Napoleon", "group": 1},
{"id": "Mlle.Baptistine", "group": 1},
{"id": "Mme.Magloire", "group": 1},
{"id": "CountessdeLo", "group": 1},
{"id": "Geborand", "group": 1},
{"id": "Champtercier", "group": 1},
{"id": "Cravatte", "group": 1},
{"id": "Count", "group": 1},
{"id": "OldMan", "group": 1},
{"id": "Labarre", "group": 2},
{"id": "Valjean", "group": 2},
{"id": "Marguerite", "group": 3},
{"id": "Mme.deR", "group": 2},
{"id": "Isabeau", "group": 2},
{"id": "Gervais", "group": 2},
{"id": "Tholomyes", "group": 3},
{"id": "Listolier", "group": 3},
{"id": "Fameuil", "group": 3},
{"id": "Blacheville", "group": 3},
{"id": "Favourite", "group": 3},
{"id": "Dahlia", "group": 3},
{"id": "Zephine", "group": 3},
{"id": "Fantine", "group": 3},
{"id": "Mme.Thenardier", "group": 4},
{"id": "Thenardier", "group": 4},
{"id": "Cosette", "group": 5},
{"id": "Javert", "group": 4},
{"id": "Fauchelevent", "group": 0},
{"id": "Bamatabois", "group": 2},
{"id": "Perpetue", "group": 3},
{"id": "Simplice", "group": 2},
{"id": "Scaufflaire", "group": 2},
{"id": "Woman1", "group": 2},
{"id": "Judge", "group": 2},
{"id": "Champmathieu", "group": 2},
{"id": "Brevet", "group": 2},
{"id": "Chenildieu", "group": 2},
{"id": "Cochepaille", "group": 2},
{"id": "Pontmercy", "group": 4},
{"id": "Boulatruelle", "group": 6},
{"id": "Eponine", "group": 4},
{"id": "Anzelma", "group": 4},
{"id": "Woman2", "group": 5},
{"id": "MotherInnocent", "group": 0},
{"id": "Gribier", "group": 0},
{"id": "Jondrette", "group": 7},
{"id": "Mme.Burgon", "group": 7},
{"id": "Gavroche", "group": 8},
{"id": "Gillenormand", "group": 5},
{"id": "Magnon", "group": 5},
{"id": "Mlle.Gillenormand", "group": 5},
{"id": "Mme.Pontmercy", "group": 5},
{"id": "Mlle.Vaubois", "group": 5},
{"id": "Lt.Gillenormand", "group": 5},
{"id": "Marius", "group": 8},
{"id": "BaronessT", "group": 5},
{"id": "Mabeuf", "group": 8},
{"id": "Enjolras", "group": 8},
{"id": "Combeferre", "group": 8},
{"id": "Prouvaire", "group": 8},
{"id": "Feuilly", "group": 8},
{"id": "Courfeyrac", "group": 8},
{"id": "Bahorel", "group": 8},
{"id": "Bossuet", "group": 8},
{"id": "Joly", "group": 8},
{"id": "Grantaire", "group": 8},
{"id": "MotherPlutarch", "group": 9},
{"id": "Gueulemer", "group": 4},
{"id": "Babet", "group": 4},
{"id": "Claquesous", "group": 4},
{"id": "Montparnasse", "group": 4},
{"id": "Toussaint", "group": 5},
{"id": "Child1", "group": 10},
{"id": "Child2", "group": 10},
{"id": "Brujon", "group": 4},
{"id": "Mme.Hucheloup", "group": 8}
],
"links": [
{"source": "Napoleon", "target": "Myriel", "value": 1},
{"source": "Mlle.Baptistine", "target": "Myriel", "value": 8},
{"source": "Mme.Magloire", "target": "Myriel", "value": 10},
{"source": "Mme.Magloire", "target": "Mlle.Baptistine", "value": 6},
{"source": "CountessdeLo", "target": "Myriel", "value": 1},
{"source": "Geborand", "target": "Myriel", "value": 1},
{"source": "Champtercier", "target": "Myriel", "value": 1},
{"source": "Cravatte", "target": "Myriel", "value": 1},
{"source": "Count", "target": "Myriel", "value": 2},
{"source": "OldMan", "target": "Myriel", "value": 1},
{"source": "Valjean", "target": "Labarre", "value": 1},
{"source": "Valjean", "target": "Mme.Magloire", "value": 3},
{"source": "Valjean", "target": "Mlle.Baptistine", "value": 3},
{"source": "Valjean", "target": "Myriel", "value": 5},
{"source": "Marguerite", "target": "Valjean", "value": 1},
{"source": "Mme.deR", "target": "Valjean", "value": 1},
{"source": "Isabeau", "target": "Valjean", "value": 1},
{"source": "Gervais", "target": "Valjean", "value": 1},
{"source": "Listolier", "target": "Tholomyes", "value": 4},
{"source": "Fameuil", "target": "Tholomyes", "value": 4},
{"source": "Fameuil", "target": "Listolier", "value": 4},
{"source": "Blacheville", "target": "Tholomyes", "value": 4},
{"source": "Blacheville", "target": "Listolier", "value": 4},
{"source": "Blacheville", "target": "Fameuil", "value": 4},
{"source": "Favourite", "target": "Tholomyes", "value": 3},
{"source": "Favourite", "target": "Listolier", "value": 3},
{"source": "Favourite", "target": "Fameuil", "value": 3},
{"source": "Favourite", "target": "Blacheville", "value": 4},
{"source": "Dahlia", "target": "Tholomyes", "value": 3},
{"source": "Dahlia", "target": "Listolier", "value": 3},
{"source": "Dahlia", "target": "Fameuil", "value": 3},
{"source": "Dahlia", "target": "Blacheville", "value": 3},
{"source": "Dahlia", "target": "Favourite", "value": 5},
{"source": "Zephine", "target": "Tholomyes", "value": 3},
{"source": "Zephine", "target": "Listolier", "value": 3},
{"source": "Zephine", "target": "Fameuil", "value": 3},
{"source": "Zephine", "target": "Blacheville", "value": 3},
{"source": "Zephine", "target": "Favourite", "value": 4},
{"source": "Zephine", "target": "Dahlia", "value": 4},
{"source": "Fantine", "target": "Tholomyes", "value": 3},
{"source": "Fantine", "target": "Listolier", "value": 3},
{"source": "Fantine", "target": "Fameuil", "value": 3},
{"source": "Fantine", "target": "Blacheville", "value": 3},
{"source": "Fantine", "target": "Favourite", "value": 4},
{"source": "Fantine", "target": "Dahlia", "value": 4},
{"source": "Fantine", "target": "Zephine", "value": 4},
{"source": "Fantine", "target": "Marguerite", "value": 2},
{"source": "Fantine", "target": "Valjean", "value": 9},
{"source": "Mme.Thenardier", "target": "Fantine", "value": 2},
{"source": "Mme.Thenardier", "target": "Valjean", "value": 7},
{"source": "Thenardier", "target": "Mme.Thenardier", "value": 13},
{"source": "Thenardier", "target": "Fantine", "value": 1},
{"source": "Thenardier", "target": "Valjean", "value": 12},
{"source": "Cosette", "target": "Mme.Thenardier", "value": 4},
{"source": "Cosette", "target": "Valjean", "value": 31},
{"source": "Cosette", "target": "Tholomyes", "value": 1},
{"source": "Cosette", "target": "Thenardier", "value": 1},
{"source": "Javert", "target": "Valjean", "value": 17},
{"source": "Javert", "target": "Fantine", "value": 5},
{"source": "Javert", "target": "Thenardier", "value": 5},
{"source": "Javert", "target": "Mme.Thenardier", "value": 1},
{"source": "Javert", "target": "Cosette", "value": 1},
{"source": "Fauchelevent", "target": "Valjean", "value": 8},
{"source": "Fauchelevent", "target": "Javert", "value": 1},
{"source": "Bamatabois", "target": "Fantine", "value": 1},
{"source": "Bamatabois", "target": "Javert", "value": 1},
{"source": "Bamatabois", "target": "Valjean", "value": 2},
{"source": "Perpetue", "target": "Fantine", "value": 1},
{"source": "Simplice", "target": "Perpetue", "value": 2},
{"source": "Simplice", "target": "Valjean", "value": 3},
{"source": "Simplice", "target": "Fantine", "value": 2},
{"source": "Simplice", "target": "Javert", "value": 1},
{"source": "Scaufflaire", "target": "Valjean", "value": 1},
{"source": "Woman1", "target": "Valjean", "value": 2},
{"source": "Woman1", "target": "Javert", "value": 1},
{"source": "Judge", "target": "Valjean", "value": 3},
{"source": "Judge", "target": "Bamatabois", "value": 2},
{"source": "Champmathieu", "target": "Valjean", "value": 3},
{"source": "Champmathieu", "target": "Judge", "value": 3},
{"source": "Champmathieu", "target": "Bamatabois", "value": 2},
{"source": "Brevet", "target": "Judge", "value": 2},
{"source": "Brevet", "target": "Champmathieu", "value": 2},
{"source": "Brevet", "target": "Valjean", "value": 2},
{"source": "Brevet", "target": "Bamatabois", "value": 1},
{"source": "Chenildieu", "target": "Judge", "value": 2},
{"source": "Chenildieu", "target": "Champmathieu", "value": 2},
{"source": "Chenildieu", "target": "Brevet", "value": 2},
{"source": "Chenildieu", "target": "Valjean", "value": 2},
{"source": "Chenildieu", "target": "Bamatabois", "value": 1},
{"source": "Cochepaille", "target": "Judge", "value": 2},
{"source": "Cochepaille", "target": "Champmathieu", "value": 2},
{"source": "Cochepaille", "target": "Brevet", "value": 2},
{"source": "Cochepaille", "target": "Chenildieu", "value": 2},
{"source": "Cochepaille", "target": "Valjean", "value": 2},
{"source": "Cochepaille", "target": "Bamatabois", "value": 1},
{"source": "Pontmercy", "target": "Thenardier", "value": 1},
{"source": "Boulatruelle", "target": "Thenardier", "value": 1},
{"source": "Eponine", "target": "Mme.Thenardier", "value": 2},
{"source": "Eponine", "target": "Thenardier", "value": 3},
{"source": "Anzelma", "target": "Eponine", "value": 2},
{"source": "Anzelma", "target": "Thenardier", "value": 2},
{"source": "Anzelma", "target": "Mme.Thenardier", "value": 1},
{"source": "Woman2", "target": "Valjean", "value": 3},
{"source": "Woman2", "target": "Cosette", "value": 1},
{"source": "Woman2", "target": "Javert", "value": 1},
{"source": "MotherInnocent", "target": "Fauchelevent", "value": 3},
{"source": "MotherInnocent", "target": "Valjean", "value": 1},
{"source": "Gribier", "target": "Fauchelevent", "value": 2},
{"source": "Mme.Burgon", "target": "Jondrette", "value": 1},
{"source": "Gavroche", "target": "Mme.Burgon", "value": 2},
{"source": "Gavroche", "target": "Thenardier", "value": 1},
{"source": "Gavroche", "target": "Javert", "value": 1},
{"source": "Gavroche", "target": "Valjean", "value": 1},
{"source": "Gillenormand", "target": "Cosette", "value": 3},
{"source": "Gillenormand", "target": "Valjean", "value": 2},
{"source": "Magnon", "target": "Gillenormand", "value": 1},
{"source": "Magnon", "target": "Mme.Thenardier", "value": 1},
{"source": "Mlle.Gillenormand", "target": "Gillenormand", "value": 9},
{"source": "Mlle.Gillenormand", "target": "Cosette", "value": 2},
{"source": "Mlle.Gillenormand", "target": "Valjean", "value": 2},
{"source": "Mme.Pontmercy", "target": "Mlle.Gillenormand", "value": 1},
{"source": "Mme.Pontmercy", "target": "Pontmercy", "value": 1},
{"source": "Mlle.Vaubois", "target": "Mlle.Gillenormand", "value": 1},
{"source": "Lt.Gillenormand", "target": "Mlle.Gillenormand", "value": 2},
{"source": "Lt.Gillenormand", "target": "Gillenormand", "value": 1},
{"source": "Lt.Gillenormand", "target": "Cosette", "value": 1},
{"source": "Marius", "target": "Mlle.Gillenormand", "value": 6},
{"source": "Marius", "target": "Gillenormand", "value": 12},
{"source": "Marius", "target": "Pontmercy", "value": 1},
{"source": "Marius", "target": "Lt.Gillenormand", "value": 1},
{"source": "Marius", "target": "Cosette", "value": 21},
{"source": "Marius", "target": "Valjean", "value": 19},
{"source": "Marius", "target": "Tholomyes", "value": 1},
{"source": "Marius", "target": "Thenardier", "value": 2},
{"source": "Marius", "target": "Eponine", "value": 5},
{"source": "Marius", "target": "Gavroche", "value": 4},
{"source": "BaronessT", "target": "Gillenormand", "value": 1},
{"source": "BaronessT", "target": "Marius", "value": 1},
{"source": "Mabeuf", "target": "Marius", "value": 1},
{"source": "Mabeuf", "target": "Eponine", "value": 1},
{"source": "Mabeuf", "target": "Gavroche", "value": 1},
{"source": "Enjolras", "target": "Marius", "value": 7},
{"source": "Enjolras", "target": "Gavroche", "value": 7},
{"source": "Enjolras", "target": "Javert", "value": 6},
{"source": "Enjolras", "target": "Mabeuf", "value": 1},
{"source": "Enjolras", "target": "Valjean", "value": 4},
{"source": "Combeferre", "target": "Enjolras", "value": 15},
{"source": "Combeferre", "target": "Marius", "value": 5},
{"source": "Combeferre", "target": "Gavroche", "value": 6},
{"source": "Combeferre", "target": "Mabeuf", "value": 2},
{"source": "Prouvaire", "target": "Gavroche", "value": 1},
{"source": "Prouvaire", "target": "Enjolras", "value": 4},
{"source": "Prouvaire", "target": "Combeferre", "value": 2},
{"source": "Feuilly", "target": "Gavroche", "value": 2},
{"source": "Feuilly", "target": "Enjolras", "value": 6},
{"source": "Feuilly", "target": "Prouvaire", "value": 2},
{"source": "Feuilly", "target": "Combeferre", "value": 5},
{"source": "Feuilly", "target": "Mabeuf", "value": 1},
{"source": "Feuilly", "target": "Marius", "value": 1},
{"source": "Courfeyrac", "target": "Marius", "value": 9},
{"source": "Courfeyrac", "target": "Enjolras", "value": 17},
{"source": "Courfeyrac", "target": "Combeferre", "value": 13},
{"source": "Courfeyrac", "target": "Gavroche", "value": 7},
{"source": "Courfeyrac", "target": "Mabeuf", "value": 2},
{"source": "Courfeyrac", "target": "Eponine", "value": 1},
{"source": "Courfeyrac", "target": "Feuilly", "value": 6},
{"source": "Courfeyrac", "target": "Prouvaire", "value": 3},
{"source": "Bahorel", "target": "Combeferre", "value": 5},
{"source": "Bahorel", "target": "Gavroche", "value": 5},
{"source": "Bahorel", "target": "Courfeyrac", "value": 6},
{"source": "Bahorel", "target": "Mabeuf", "value": 2},
{"source": "Bahorel", "target": "Enjolras", "value": 4},
{"source": "Bahorel", "target": "Feuilly", "value": 3},
{"source": "Bahorel", "target": "Prouvaire", "value": 2},
{"source": "Bahorel", "target": "Marius", "value": 1},
{"source": "Bossuet", "target": "Marius", "value": 5},
{"source": "Bossuet", "target": "Courfeyrac", "value": 12},
{"source": "Bossuet", "target": "Gavroche", "value": 5},
{"source": "Bossuet", "target": "Bahorel", "value": 4},
{"source": "Bossuet", "target": "Enjolras", "value": 10},
{"source": "Bossuet", "target": "Feuilly", "value": 6},
{"source": "Bossuet", "target": "Prouvaire", "value": 2},
{"source": "Bossuet", "target": "Combeferre", "value": 9},
{"source": "Bossuet", "target": "Mabeuf", "value": 1},
{"source": "Bossuet", "target": "Valjean", "value": 1},
{"source": "Joly", "target": "Bahorel", "value": 5},
{"source": "Joly", "target": "Bossuet", "value": 7},
{"source": "Joly", "target": "Gavroche", "value": 3},
{"source": "Joly", "target": "Courfeyrac", "value": 5},
{"source": "Joly", "target": "Enjolras", "value": 5},
{"source": "Joly", "target": "Feuilly", "value": 5},
{"source": "Joly", "target": "Prouvaire", "value": 2},
{"source": "Joly", "target": "Combeferre", "value": 5},
{"source": "Joly", "target": "Mabeuf", "value": 1},
{"source": "Joly", "target": "Marius", "value": 2},
{"source": "Grantaire", "target": "Bossuet", "value": 3},
{"source": "Grantaire", "target": "Enjolras", "value": 3},
{"source": "Grantaire", "target": "Combeferre", "value": 1},
{"source": "Grantaire", "target": "Courfeyrac", "value": 2},
{"source": "Grantaire", "target": "Joly", "value": 2},
{"source": "Grantaire", "target": "Gavroche", "value": 1},
{"source": "Grantaire", "target": "Bahorel", "value": 1},
{"source": "Grantaire", "target": "Feuilly", "value": 1},
{"source": "Grantaire", "target": "Prouvaire", "value": 1},
{"source": "MotherPlutarch", "target": "Mabeuf", "value": 3},
{"source": "Gueulemer", "target": "Thenardier", "value": 5},
{"source": "Gueulemer", "target": "Valjean", "value": 1},
{"source": "Gueulemer", "target": "Mme.Thenardier", "value": 1},
{"source": "Gueulemer", "target": "Javert", "value": 1},
{"source": "Gueulemer", "target": "Gavroche", "value": 1},
{"source": "Gueulemer", "target": "Eponine", "value": 1},
{"source": "Babet", "target": "Thenardier", "value": 6},
{"source": "Babet", "target": "Gueulemer", "value": 6},
{"source": "Babet", "target": "Valjean", "value": 1},
{"source": "Babet", "target": "Mme.Thenardier", "value": 1},
{"source": "Babet", "target": "Javert", "value": 2},
{"source": "Babet", "target": "Gavroche", "value": 1},
{"source": "Babet", "target": "Eponine", "value": 1},
{"source": "Claquesous", "target": "Thenardier", "value": 4},
{"source": "Claquesous", "target": "Babet", "value": 4},
{"source": "Claquesous", "target": "Gueulemer", "value": 4},
{"source": "Claquesous", "target": "Valjean", "value": 1},
{"source": "Claquesous", "target": "Mme.Thenardier", "value": 1},
{"source": "Claquesous", "target": "Javert", "value": 1},
{"source": "Claquesous", "target": "Eponine", "value": 1},
{"source": "Claquesous", "target": "Enjolras", "value": 1},
{"source": "Montparnasse", "target": "Javert", "value": 1},
{"source": "Montparnasse", "target": "Babet", "value": 2},
{"source": "Montparnasse", "target": "Gueulemer", "value": 2},
{"source": "Montparnasse", "target": "Claquesous", "value": 2},
{"source": "Montparnasse", "target": "Valjean", "value": 1},
{"source": "Montparnasse", "target": "Gavroche", "value": 1},
{"source": "Montparnasse", "target": "Eponine", "value": 1},
{"source": "Montparnasse", "target": "Thenardier", "value": 1},
{"source": "Toussaint", "target": "Cosette", "value": 2},
{"source": "Toussaint", "target": "Javert", "value": 1},
{"source": "Toussaint", "target": "Valjean", "value": 1},
{"source": "Child1", "target": "Gavroche", "value": 2},
{"source": "Child2", "target": "Gavroche", "value": 2},
{"source": "Child2", "target": "Child1", "value": 3},
{"source": "Brujon", "target": "Babet", "value": 3},
{"source": "Brujon", "target": "Gueulemer", "value": 3},
{"source": "Brujon", "target": "Thenardier", "value": 3},
{"source": "Brujon", "target": "Gavroche", "value": 1},
{"source": "Brujon", "target": "Eponine", "value": 1},
{"source": "Brujon", "target": "Claquesous", "value": 1},
{"source": "Brujon", "target": "Montparnasse", "value": 1},
{"source": "Mme.Hucheloup", "target": "Bossuet", "value": 1},
{"source": "Mme.Hucheloup", "target": "Joly", "value": 1},
{"source": "Mme.Hucheloup", "target": "Grantaire", "value": 1},
{"source": "Mme.Hucheloup", "target": "Bahorel", "value": 1},
{"source": "Mme.Hucheloup", "target": "Courfeyrac", "value": 1},
{"source": "Mme.Hucheloup", "target": "Gavroche", "value": 1},
{"source": "Mme.Hucheloup", "target": "Enjolras", "value": 1}
]
}
<!DOCTYPE html>
<meta charset='utf-8'>
<style>
.links line {
stroke: #999;
stroke-opacity: 0.6;
}
.nodes circle {
stroke: #fff;
stroke-width: 1.5px;
}
</style>
<svg width='960' height='600'></svg>
<script>
window.sqrt = Math.sqrt;
window.min = Math.min;
</script>
<script src='d3-wasm-force.js'></script>
<script src='https://d3js.org/d3.v4.min.js'></script>
<script>
var svg = d3.select('svg'),
width = +svg.attr('width'),
height = +svg.attr('height');
var color = d3.scaleOrdinal(d3.schemeCategory20);
d3wasm.loaded
.then(() => {
d3.json('graph.json', (error, graph) => {
if (error) throw error;
const simulation = d3wasm.forceSimulation(graph.nodes, true)
.force('charge', d3wasm.forceManyBody())
.force('center', d3wasm.forceCenter(width / 2, height / 2))
.force('link', d3wasm.forceLink().links(graph.links).id(d => d.id))
.stop();
var link = svg.append('g')
.attr('class', 'links')
.selectAll('line')
.data(graph.links)
.enter().append('line')
.attr('stroke-width', d => Math.sqrt(d.value));
var node = svg.append('g')
.attr('class', 'nodes')
.selectAll('circle')
.data(graph.nodes)
.enter().append('circle')
.attr('r', 5)
.attr('fill', d => color(d.group))
.call(d3.drag()
.on('start', dragstarted)
.on('drag', dragged)
.on('end', dragended));
function ticked() {
simulation.tick();
link
.attr('x1', d => d.source.x)
.attr('y1', d => d.source.y)
.attr('x2', d => d.target.x)
.attr('y2', d => d.target.y);
node
.attr('cx', d => d.x)
.attr('cy', d => d.y);
}
setInterval(ticked, 25);
function dragstarted(d) {
if (!d3.event.active) simulation.alphaTarget(0.3).restart();
d.fx = d.x;
d.fy = d.y;
}
function dragged(d) {
d.x = d3.event.x;
d.y = d3.event.y;
d.fx = d.x;
d.fy = d.y;
}
function dragended(d) {
if (!d3.event.active) simulation.alphaTarget(0);
d.fx = null;
d.fy = null;
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.