Commit Graph

175 Commits

Author SHA1 Message Date
Mike Bostock
c69a91aec5 Add phyllotaxis image. 2016-06-20 15:26:49 -07:00
Mike Bostock
3c00395e78 Rename drag to velocity decay. 2016-06-20 14:02:30 -07:00
Mike Bostock
44c73909ee Simplify node-fixing API.
Rather than storing separate state for the nodes’ fixed positions, just use the
fx and fy properties on the nodes themselves. This is more similar to the 3.x
API which used node.fixed (and node.px, node.py to store the previous position).
This eliminates the need to expose additional APIs for getting, setting,
clearing and iterating over the fixed positions.

Fixes #35.
2016-06-20 13:50:42 -07:00
Mike Bostock
145250d68b 0.7.1 2016-06-19 09:25:07 -07:00
Mike Bostock
88aa802ab3 Update dependencies. 2016-06-19 09:25:07 -07:00
Mike Bostock
11a3c6fb86 Tag as d3-module. Related d3/d3#2827. 2016-06-14 09:23:27 -07:00
Mike Bostock
2942439ebd 0.7.0 2016-06-07 20:53:52 -07:00
Mike Bostock
31f6027bba Export to d3.
Related d3/d3#2840.
2016-06-07 20:53:45 -07:00
Mike Bostock
04c525a16e Update README. 2016-06-07 12:33:27 -07:00
Mike Bostock
04c2386ef0 Merge pull request #33 from jheer/master
Support unfix of all nodes.
2016-06-07 12:32:04 -07:00
Jeffrey Heer
0e28745c34 Add unfixAll method. 2016-06-07 12:29:24 -07:00
Mike Bostock
68a4cdb033 0.6.3 2016-05-20 14:22:20 -07:00
Mike Bostock
3cbde605e3 Update d3-collection to 0.2. 2016-05-20 14:22:11 -07:00
Mike Bostock
2495c0b7ba Update README. 2016-05-19 13:05:27 -07:00
Mike Bostock
b264ebc70d Update README. 2016-05-18 09:53:31 -07:00
Mike Bostock
80d15201d0 Add ESLint. Related d3/d3-scale#59. 2016-05-14 21:21:29 -07:00
Mike Bostock
5b800d14cc 0.6.2 2016-05-13 11:14:06 -07:00
Mike Bostock
e19a24e416 Link to interactive graph. 2016-05-13 11:13:36 -07:00
Mike Bostock
f5a9ae2555 If target position is NaN, do nothing. 2016-05-13 11:11:17 -07:00
Mike Bostock
7f0201b285 Update README. 2016-05-12 15:54:15 -07:00
Mike Bostock
61ac68434d Add simulation.find. Fixes #31. 2016-05-12 15:52:32 -07:00
Mike Bostock
80ea6904ef Document the expected number of ticks. 2016-05-12 15:30:55 -07:00
Mike Bostock
b6c842b2ad 0.6.1 2016-05-12 13:17:56 -07:00
Mike Bostock
06584d311c Update README. 2016-05-12 13:17:49 -07:00
Mike Bostock
e6ac233670 Better default link strength.
Use the minimum connectedness of the source or target, not the average.
2016-05-12 12:15:05 -07:00
Mike Bostock
ab792d2590 Better link strength normalization.
Related #30. Rather than normalize the total force applied per node, have the
default link strength be inversely proportional to the number of links for the
source and the target. This way, if the source or target is heavily connected,
the strength of the link is reduced. However, we still bias the application of
the link such that the less-connected of the two nodes is moved more.
2016-05-12 09:26:17 -07:00
Mike Bostock
28bacadb96 Reduce default strength. 2016-05-12 09:25:48 -07:00
Mike Bostock
8db7cbdf6c Fix #30 - normalize link force per node. 2016-05-11 19:34:49 -07:00
Mike Bostock
0ae4a1b6b9 Update README. 2016-05-10 11:02:40 -07:00
Mike Bostock
9f3116bb18 0.6.0 2016-05-10 10:56:22 -07:00
Mike Bostock
093d16de68 Prepare for minor release. 2016-05-10 10:56:19 -07:00
Mike Bostock
8c86ea74f0 Update README. 2016-05-10 10:41:29 -07:00
Mike Bostock
4d36b90eb9 Update README. 2016-05-10 10:21:46 -07:00
Mike Bostock
41044c8be2 Update README. 2016-05-10 10:20:49 -07:00
Mike Bostock
92a496559a Update README. 2016-05-10 10:20:34 -07:00
Mike Bostock
d486875516 Update README. 2016-05-10 10:20:07 -07:00
Mike Bostock
275f4b2bea Update README. 2016-05-10 10:19:42 -07:00
Mike Bostock
f70a40f78d Default to the node’s current position.
Nice!
2016-05-10 10:15:17 -07:00
Mike Bostock
add1373738 Replace d3.forceFix with simulation.{fix,unfix}.
This feels a bit cleaner since you don’t need to track the name of the fixing
force externally. It also enforces that fixing happens after the application of
any forces.
2016-05-10 10:08:25 -07:00
Mike Bostock
a4153e77fd Add d3.forceFix. Fixes #27. 2016-05-10 09:49:20 -07:00
Mike Bostock
453e316240 Update README. 2016-05-09 14:03:40 -07:00
Mike Bostock
56cb60237a Update README. 2016-05-09 14:02:24 -07:00
Mike Bostock
feb593fa2b Update README. 2016-05-09 13:59:44 -07:00
Mike Bostock
f218ca2f6d Update README. 2016-05-09 13:59:15 -07:00
Mike Bostock
d767dcfcf9 Update README. 2016-05-09 13:58:37 -07:00
Mike Bostock
8a2c8590bb Add simulation.alphaTarget.
This lets you set the “desired” alpha for the simulation, and have the
simulation smoothly interpolate towards the desired value. By default, the
target value is zero, such that the simulation cools. However, by setting it to
a non-zero value, such as during a drag interaction, you can also use it to have
the simulation heat. Fixes #26.

This commit also changes simulation.restart so that it no longer resets the
alpha to one, and changes the meaning of simulation.alphaDecay. The new default
alphaDecay now cause the simulation to end after 300 ticks, instead of 345.
2016-05-09 13:41:33 -07:00
Mike Bostock
85b0b09d34 Minor optimization.
Don’t test the bounding box on leaf nodes; test the circles.
2016-05-04 08:40:17 -07:00
Mike Bostock
f15a5adad7 Process collisions serially.
It’s tempting to do them independently (in parallel), but this makes convergence
much slower. We’re now moving nodes while they’re in the quadtree, which means
we could miss a few collisions; but since the tree is rebuilt on each iteration
that should probably be fine.

This reverts part of 95354e8470, though it retains
the area-biased resolution and the performance improvements.
2016-05-04 07:32:18 -07:00
Mike Bostock
4cec18385d Style. 2016-05-04 07:31:42 -07:00
Mike Bostock
ca3aecc94e Tiny optimization. 2016-05-03 22:29:50 -07:00