d3-force project
Fix #7 - forces are now mutable, so it’s easier to change their settings and they behave more like other configurable objects in D3 (though less like curves, easing functions and interpolators). Fix #9 - forces now have a dedicated interface rather than just being beforetick listeners. This allows forces to be re-initialized when the nodes change. Fix #10 - d3.forcePosition now initializes node positions and velocities. |
||
|---|---|---|
| src | ||
| .eslintrc | ||
| .gitignore | ||
| .npmignore | ||
| d3-force.sublime-project | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
d3-force
…
Installing
If you use NPM, npm install d3-force. Otherwise, download the latest release. You can also load directly from d3js.org, either as a standalone library or as part of D3 4.0 alpha. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3_force global is exported:
<script src="https://d3js.org/d3-collection.v0.1.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.4.min.js"></script>
<script src="https://d3js.org/d3-quadtree.v0.2.min.js"></script>
<script src="https://d3js.org/d3-timer.v0.4.min.js"></script>
<script src="https://d3js.org/d3-force.v0.0.min.js"></script>
<script>
var simulation = d3_force.forceSimulation(nodes);
</script>
API Reference
…