g6/plugins/layout.forceAtlas2/layout.worker.js
2018-08-14 15:50:11 +08:00

8 lines
201 B
JavaScript

const ForceCal = require('./forceCalculator');
onmessage = function(event) {
const forceCal = new ForceCal();
const nodes = forceCal.updateNodesByForces(event.data);
self.postMessage(nodes);
};