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
Mike Bostock
0f68d7259e
Reset link force when links change.
2016-04-23 08:43:59 -07:00
Mike Bostock
15728e3cf9
0.0.3
2016-04-22 16:08:25 -07:00
Mike Bostock
95cd502143
Fix typo.
2016-04-22 16:08:22 -07:00
Mike Bostock
7830f5415d
0.0.2
2016-04-22 15:56:00 -07:00
Mike Bostock
0744d26f06
Fix #12 - make position configurable.
2016-04-22 15:35:56 -07:00
Mike Bostock
74bfd620a3
Better collision detection.
...
By looking into the future, we can better avoid collisions.
Also remove duplicate initialization of node positions.
2016-04-22 13:04:57 -07:00
Mike Bostock
9944ad19ed
Fix for zero alphaDecay.
2016-04-22 10:04:24 -07:00
Mike Bostock
8c2113f53c
Fix manyBody force.
2016-04-22 09:55:12 -07:00
Mike Bostock
d6f45ffc53
Update to d3-quadtree 0.7.
2016-04-22 09:45:03 -07:00
Mike Bostock
dfe79d5c7d
Add collision force.
2016-04-21 17:49:52 -07:00
Mike Bostock
b5ad5d589d
Air it out a bit.
2016-04-21 15:52:14 -07:00
Mike Bostock
19324ef21e
Don’t rely on this.
2016-04-21 13:44:52 -07:00
Mike Bostock
f628880885
Allow forces to share the quadtree.
2016-04-21 13:27:10 -07:00
Mike Bostock
377713e73d
Increase default theta.
2016-04-20 17:52:10 -07:00
Mike Bostock
5b46023e88
Rename charge to strength.
2016-04-20 15:31:37 -07:00
Mike Bostock
c30fc9513e
Modify position, not velocity.
...
We don’t want re-centering to apply momentum.
2016-04-20 15:26:53 -07:00
Mike Bostock
321784c573
Fix #13 - initialize positions and velocities.
2016-04-20 15:24:49 -07:00
Mike Bostock
32724da3e5
Add d3.forceCenter.
2016-04-20 15:12:04 -07:00
Mike Bostock
900d9e1b24
Fix #1 - allow linking by string identifier.
2016-04-20 13:37:41 -07:00
Mike Bostock
44aabfab2a
Allow simulation.force(name, null).
2016-04-20 12:53:35 -07:00
Mike Bostock
166bda8cdd
Initialize link.index, too.
2016-04-20 12:38:01 -07:00
Mike Bostock
541ef54098
Allow numeric source and target identifiers.
2016-04-20 12:33:10 -07:00
Mike Bostock
46eb5553a0
Per-link strength and distance.
2016-04-20 10:39:32 -07:00
Mike Bostock
71510f3725
Make force.nodes optional.
2016-04-20 09:53:56 -07:00
Mike Bostock
fd9b00383a
Handle coincident nodes.
2016-04-20 09:52:14 -07:00
Mike Bostock
9392d4e1b7
Update d3-quadtree.
2016-04-19 17:18:35 -07:00
Mike Bostock
3d449cd12d
Remove unused var.
2016-04-16 08:00:59 -07:00
Mike Bostock
5a3d213812
Handle coincident nodes.
2016-04-11 11:03:07 -07:00
Mike Bostock
7ae3bbc451
Fix #10 - non-recursive many-body force.
2016-04-11 10:36:35 -07:00
Mike Bostock
1fe10b4c18
Variable charge forces.
2016-04-08 15:07:00 -07:00
Mike Bostock
f08062fb16
Assign node.index in d3.forceSimulation.
...
Also get ready for d3-quadtree 0.3 and per-node forces.
2016-04-08 08:33:00 -07:00
Mike Bostock
13fd5ee8ce
Remove dead code.
2016-04-07 13:13:16 -07:00
Mike Bostock
a72896d49f
Preserve alpha when setting alphaDecay.
2016-04-07 11:55:45 -07:00