Commit Graph

90 Commits

Author SHA1 Message Date
Mike Bostock
fca02cfa51 Update README. 2016-04-27 17:52:58 -07:00
Mike Bostock
dfb0430201 Update README. 2016-04-27 17:36:07 -07:00
Mike Bostock
5c6d4f5fb0 Update README. 2016-04-27 16:59:13 -07:00
Mike Bostock
5e0e32ee6d Update README. 2016-04-27 16:57:38 -07:00
Mike Bostock
01946978ba Update README. 2016-04-27 16:57:24 -07:00
Mike Bostock
c28977dc71 Update README. 2016-04-27 16:55:24 -07:00
Mike Bostock
6d9446c91d Update README. 2016-04-27 16:55:03 -07:00
Mike Bostock
4021c94167 Update README. 2016-04-27 16:54:26 -07:00
Mike Bostock
26e9ff0fa8 Update README. 2016-04-27 16:52:04 -07:00
Mike Bostock
eca9a02f2f Increase the default alphaMin. 2016-04-27 16:35:41 -07:00
Mike Bostock
0f88799ff3 Update README. 2016-04-27 16:22:46 -07:00
Mike Bostock
647fd80879 Update README. 2016-04-27 16:21:31 -07:00
Mike Bostock
7080b8767d Update README. 2016-04-27 16:20:53 -07:00
Mike Bostock
6d4ae3717a Update README. 2016-04-27 16:18:34 -07:00
Mike Bostock
bb632eab50 Update README. 2016-04-27 15:31:41 -07:00
Mike Bostock
c22de8ea34 Update README. 2016-04-27 15:18:38 -07:00
Mike Bostock
a51360bcf7 Update README. 2016-04-27 12:02:18 -07:00
Mike Bostock
324062b407 0.3.0 2016-04-27 11:24:27 -07:00
Mike Bostock
c735b726e4 Prepare for minor release. 2016-04-27 11:24:25 -07:00
Mike Bostock
5d321b2190 Allow iterative constraint application.
Adds {forceCollide,forceLink}.iterations, which defaults to one.
2016-04-27 11:20:21 -07:00
Mike Bostock
19e2a7a7e0 Reduce default drag. 2016-04-27 11:20:10 -07:00
Mike Bostock
93e0397120 Improve stability of collision & links.
We need to look into the future!
2016-04-27 11:03:13 -07:00
Mike Bostock
2f7cd4ae93 Rename simulation.start to simulation.restart.
This is more consistent with timer.restart, and more appropriate given that the
simulation now starts automatically.
2016-04-27 09:52:44 -07:00
Mike Bostock
b7014b9987 Update README. 2016-04-27 09:50:06 -07:00
Mike Bostock
b88b656786 0.2.2 2016-04-27 09:36:52 -07:00
Mike Bostock
831ad55a59 Fix #20 - simulation.tick now returns boolean.
This changes simulation.tick to always advance the simulation one step,
regardless of the current value of alpha and alphaMin. If alpha is less than
alphaMin after this step, simulation.tick returns true, indicating that the
simulation can be safely ended.

Furthermore, simulation.tick no longer dispatches a tick event; the tick event
is only dispatched by the simulation’s internal timer. This is now consistent
with simulation.stop, which likewise does not dispatch an end event; the end
event is only dispatched when the simulation’s internal timer stops.
2016-04-27 09:17:47 -07:00
Mike Bostock
6850fb64cf 0.2.1 2016-04-26 17:39:44 -07:00
Mike Bostock
aa410cf32e Deterministic initialization!
Rather than initialize the node positions randomly, use a phyllotaxis. This is
just as good, and means the resulting behavior will be deterministic as long as
no nodes are exactly coincident.
2016-04-26 17:37:00 -07:00
Mike Bostock
ec754db14f Update README. 2016-04-26 11:51:52 -07:00
Mike Bostock
36ddf9e12b Update README. 2016-04-26 11:50:55 -07:00
Mike Bostock
92a8a7845b Update README. 2016-04-26 11:26:02 -07:00
Mike Bostock
48f24e0a54 0.2.0 2016-04-26 09:43:39 -07:00
Mike Bostock
72d265c740 Prepare for minor release. 2016-04-26 09:43:30 -07:00
Mike Bostock
e88cd9e8c3 Rename for clarity. 2016-04-26 09:34:32 -07:00
Mike Bostock
e532b18700 Fix #18 - allow manual ticking.
Calling simulation.stop no longer resets the alpha, so a subsequent call to
simulation.start now resumes the simulation, and you can call simulation.tick to
run the simulation manually.

This commit also removes the start event. There’s not much of a point to the
start event since it’s impossible to listen for it in the normal case: the event
is dispatched during the construction of the simulation before any listeners can
be registered. Even in other cases, the simulation is always restarted manually,
so you could always notify a listener manually at the same time. Furthermore,
supporting a start event would require us to track whether the timer is running,
so it’s simpler to just leave it out. (And lastly, eliminating the start event
avoids some confusion about the relationship between simulation.stop and the end
event, which are unrelated!)

Lastly, simplify the recalculation of the current iteration when changing the
alpha decay rate constant.
2016-04-26 09:18:51 -07:00
Mike Bostock
3810e0fa11 Pass nodes to force.initialize. 2016-04-25 21:47:24 -07:00
Mike Bostock
b330311b4f Default empty nodes and links. 2016-04-25 17:04:51 -07:00
Mike Bostock
48836d0dfb Pass radius to d3.forceCollide constructor. 2016-04-25 14:00:54 -07:00
Mike Bostock
84e41d3f42 0.1.0 2016-04-25 10:54:00 -07:00
Mike Bostock
39454e6237 Prepare for minor release. 2016-04-25 10:53:56 -07:00
Mike Bostock
d0acda9d86 Fix #15 - rename friction to drag. 2016-04-25 10:42:19 -07:00
Mike Bostock
27646831c6 Fix position initialization. 2016-04-25 09:42:22 -07:00
Mike Bostock
b35af748dd Rename for consistency. 2016-04-25 09:40:59 -07:00
Mike Bostock
2dcf98c650 Add a tiny bit of blending to collision.
This greatly improves stability.
2016-04-25 09:38:39 -07:00
Mike Bostock
a6dcf0c876 Improve stability of collision detection. 2016-04-23 14:24:37 -07:00
Mike Bostock
53fb14fcbd Add d3.forceContain. 2016-04-23 10:24:15 -07:00
Mike Bostock
ffa61d6e49 0.0.4 2016-04-23 09:48:58 -07:00
Mike Bostock
6ad4bc2663 More stable collision detection. 2016-04-23 09:48:31 -07:00
Mike Bostock
d1aff9acf0 Don’t require nodes on creation. 2016-04-23 09:38:08 -07:00
Mike Bostock
b4896d57ef Fix the many-body force.
Mutating the tree deletes the accumulated charges!
2016-04-23 09:37:09 -07:00