Skip to content

Commit

Permalink
forceCenter is now more gentle
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Jul 28, 2020
1 parent c1ee878 commit 006ea1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/center-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tape("forceCenter repositions nodes", function(test) {
const f = force.forceSimulation().force("center", center).stop();
const a = { x: 100, y: 0 }, b = { x: 200, y: 0 }, c = { x: 300, y: 0 };
f.nodes([a, b, c]);
f.tick();
f.alphaDecay(0).tick(250);
test.nodeEqual(a, { index: 0, x: -100, y: 0, vy: 0, vx: 0 });
test.nodeEqual(b, { index: 1, x: 0, y: 0, vy: 0, vx: 0 });
test.nodeEqual(c, { index: 2, x: 100, y: 0, vy: 0, vx: 0 });
Expand Down

0 comments on commit 006ea1b

Please sign in to comment.