A module for forceSimulations to define connections between nodes as directional vectors, consisting of angles within a cone of dispersion, and magnitudes defined either by a constant or by a function of the individual vectors. Reverse-engineered from the Link force by Mike Bostock.
Public methods on vector are all defined on the force object at the bottom of vector.js.
force.initialize: begins running the simulationforce.nodes: the data used for each nodeforce.vectors: the connections between nodes, defined as an array ofsourceandtargetobjectsforce.id: a function to allow the simulation to internally identify eachnodefor updatesforce.iterations: (ADVANCED) I'm not really sure... it's just kind of a thing that Mike made work and it affects how strongly your force is applied during the simulationforce.orientation: the basis degree for orienting the angles offorce.coneforce.direction: 'reverse' will invert the cone of dispersionforce.strength: a relative multiplier that affects the potency of each vector while the simulation is runningforce.magnitude: either a constant number indicating the length in pixels of each vector, or a function applied to eachvectorto determine its relative lengthforce.cone: an interpolative scale that is applied to a rawdegreevalue to coerce the vector to go in a specific angle relative to its source