Link, remove links parameter
This commit is contained in:
@@ -8,15 +8,13 @@ import jiggle from "./jiggle";
|
|||||||
* - removed other unused functions
|
* - removed other unused functions
|
||||||
* Alpha should be constant 1 for accurate simulation
|
* Alpha should be constant 1 for accurate simulation
|
||||||
*/
|
*/
|
||||||
export default function(links) {
|
export default function() {
|
||||||
var dataSizeFactor,
|
var dataSizeFactor,
|
||||||
distance = constant(30),
|
distance = constant(30),
|
||||||
distances = [],
|
distances = [],
|
||||||
nodes,
|
nodes,
|
||||||
iterations = 1;
|
iterations = 1;
|
||||||
|
|
||||||
if (links == null) links = [];
|
|
||||||
|
|
||||||
function force(alpha) {
|
function force(alpha) {
|
||||||
// Each iteration in a tick
|
// Each iteration in a tick
|
||||||
for (var k = 0, n = nodes.length, source, target, i, j, x, y, l; k < iterations; ++k) {
|
for (var k = 0, n = nodes.length, source, target, i, j, x, y, l; k < iterations; ++k) {
|
||||||
|
|||||||
Reference in New Issue
Block a user