You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has the benefit that you can give each force a different subset of the nodes, but it raises some questions:
What if I want each node’s forces to have different parameters? Do I need to register separate forces for each node? Or should the force be parameterizable, e.g., forceLink.strength takes a function that is evaluated for each link?
If the force is parameterizable, does that mean the parameters are re-evaluated when the array of nodes (or links) changes, or are the parameters evaluated every time the force is invoked? Is it worth trying to optimize the common case of constant-value forces?
If forces are parameterizable, why do we also need to specify the array of nodes to each force—couldn’t they just always use the array of nodes associated with the simulation, and you could define the strength as zero if you didn’t want the force to apply to those nodes?
If forces do always use the simulation’s array of nodes, should the simulation also keep track of the links? (Probably not, since I think links only need to be known by d3.forceLink, whereas multiple parties care about nodes?)
The text was updated successfully, but these errors were encountered:
In the new design, you pass each force the array of nodes (and in some cases links):
This has the benefit that you can give each force a different subset of the nodes, but it raises some questions:
The text was updated successfully, but these errors were encountered: