Open cmdares opened 4 years ago
@cmdares you can use nodeThreeObject
and linkThreeObject
to change the shape of your nodes and links. So you can make them visually look like cubes or any other 3D object you're interested on.
As for the collisions, there is a bounding box collision force: https://github.com/emeeks/d3-bboxCollide , but that only works in 2D. That d3-force plugin would have to be converted to the 3D domain before it can be used with 3d-force-graph
.
@vasturiano Didn't you do something with collision in your example? https://vasturiano.github.io/3d-force-graph/example/collision-detection/ https://github.com/vasturiano/3d-force-graph/blob/master/example/collision-detection/index.html
@Alexithemia yes, but that's collision between spheres and against fixed straight planes.
Collision between cuboids requires a dedicated logic, and to my knowledge there is no existing available d3-force-3d
plugin. It would require a 3D version of the above mentioned d3-bboxCollide
.
@vasturiano can we use Blender model (.glb,gltf) as node ?
ref:https://js.cytoscape.org/demos/compound-nodes/ In complex network, node grouping is an important analysis method. How to implement with 3d? Box as a cube. When dragging the node over there, the cube needs to detect collision and expand dynamically.
Sent with GitHawk