Rajat Jain
Rajat Jain

Reputation: 482

Plugging in d3-force-3d calculations into a 3-D graph renderer

I am a threejs noob and my use case requires me to render force directed graphs in 3D. I am using d3-force-3d to calculate all the forces that are on the nodes of the graph. However, I've failed to find any library that takes those calculations into account and creates a 3 dimensional graph for the same.

I could find only one library that makes force directed graphs in 3D, which is 3d-force-graph, but it does not allow you to edit forces, which I need to.

Is there a library that directly plugs in d3 calculations and renders a 3D-graph?

Upvotes: 1

Views: 833

Answers (1)

vastur
vastur

Reputation: 71

As of v1.15.0, 3d-force-graph allows for manipulation of the d3 forces and decay parameters, using the methods d3Force(), d3AlphaDecay() and d3VelocityDecay().

Here's an example with custom force configuration that adds collision detection to free moving nodes: https://vasturiano.github.io/3d-force-graph/example/collision-detection/

Code from example: https://github.com/vasturiano/3d-force-graph/tree/master/example/collision-detection

Upvotes: 1

Related Questions