vasturiano / 3d-force-graph-vr

3D force-directed graph component in VR
https://vasturiano.github.io/3d-force-graph-vr/example/large-graph/
MIT License
223 stars 51 forks source link

Click to expand / collapse in VR? #43

Open edent opened 2 years ago

edent commented 2 years ago

Describe the bug I'm trying to create a DAG where the nodes expand or collapse when clicked on.

I'm following this demo - https://github.com/vasturiano/3d-force-graph/blob/master/example/expandable-nodes/index.html

Changing the library to

<script src="//unpkg.com/3d-force-graph-vr"></script>

And the graph to

const Graph = ForceGraphVR()(elem)

Allows me to display the initial graph. I can view it in my VR headset, but I can't interact with the nodes.

Clicking on them in a regular browsers produces the error:

Uncaught TypeError: cyclic object value

Is there any way to have interactive nodes in the VR view? Thanks!