Igor a610223309 Improve student view | 5 anni fa | |
---|---|---|
.. | ||
tasks | 5 anni fa | |
Gruntfile.js | 5 anni fa | |
README.md | 5 anni fa | |
supervisor.js | 5 anni fa | |
worker.js | 5 anni fa |
Algorithm by Mathieu Jacomy.
Plugin by Guillaume Plique.
This plugin implements ForceAtlas2, a force-directed layout algorithm.
For optimization purposes, the algorithm's computations are delegated to a web worker.
sigma.startForceAtlas2
Starts or unpauses the layout. It is possible to pass a configuration if this is the first time you start the layout.
sigmaInstance.startForceAtlas2(config);
sigma.stopForceAtlas2
Pauses the layout.
sigmaInstance.stopForceAtlas2();
sigma.configForceAtlas2
Changes the layout's configuration.
sigmaInstance.configForceAtlas2(config);
sigma.killForceAtlas2
Completely stops the layout and terminates the assiociated worker. You can still restart it later, but a new worker will have to initialize.
sigmaInstance.killForceAtlas2();
sigma.isForceAtlas2Running
Returns whether ForceAtlas2 is running.
sigmaInstance.isForceAtlas2Running();
Algorithm configuration
false
: switch ForceAtlas' model from lin-lin to lin-log (tribute to Andreas Noack). Makes clusters more tight.false
false
0
: how much influence you give to the edges weight. 0 is "no influence" and 1 is "normal".1
: how much repulsion you want. More makes a more sparse graph.false
1
: attracts nodes to the center. Prevents islands from drifting away.true
: should we use the algorithm's Barnes-Hut to improve repulsion's scalability (O(n²)
to O(nlog(n))
)? This is useful for large graph but harmful to small ones.0.5
1
1
: number of iterations to be run before the first render.1
: number of iterations to be run before each render.Supervisor configuration
true
: should the layout use a web worker?