Commit Graph

164 Commits

Author SHA1 Message Date
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
Mike Bostock
563481bb5a Tiny optimization. 2016-05-03 16:15:55 -07:00
Mike Bostock
95354e8470 Improve collision detection.
Fix #25. We now resolve collisions for all nodes independently, rather than
moving one node at a time. And since we’re not mutating the quadtree while
resolving, the quadtree can now store the maximum radius for each quadrant,
accelerating search! We can also optimize resolution a little bit since now
resolutions are always symmetric.

Collision resolutions are now biased so that the acceleration is inversely
proportional to the circle’s area, such that larger circles (which are more
likely to overlap many small circles) are more stable.

Also: only jiggle if two circles are overlapping.
2016-05-03 16:07:44 -07:00
Mike Bostock
a55cff0320 Update README. 2016-05-02 15:43:32 -07:00
Mike Bostock
2cab3adafe Update README. 2016-05-02 15:26:25 -07:00
Mike Bostock
a2a01c5cf6 Update README. 2016-05-02 15:25:37 -07:00
Mike Bostock
3ee7362dc0 Update beeswarm. 2016-04-29 14:13:04 -07:00
Mike Bostock
eed421a602 Update README. 2016-04-29 11:09:15 -07:00
Mike Bostock
57c49b5fdb Update README. 2016-04-29 11:08:36 -07:00
Mike Bostock
3f7234064b Add Beeswarm example. 2016-04-29 11:08:13 -07:00
Mike Bostock
1789648299 0.5.0 2016-04-29 10:46:54 -07:00
Mike Bostock
d62e947d71 Prepare for minor release. 2016-04-29 10:46:51 -07:00