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
214 stars 51 forks source link

Uncaught TypeError: Cannot read property 'components' of undefined #11

Closed nitrosx closed 4 years ago

nitrosx commented 5 years ago

I received the following error when I try my code below:

3d-force-graph-vr.min.js:136 Uncaught TypeError: Cannot read property 'components' of undefined at Function.d3Force (3d-force-graph-vr.min.js:136) at Function.n.(anonymous function) [as d3Force] (https://unpkg.com/3d-force-graph-vr@1.23.0/dist/3d-force-graph-vr.min.js:133:695254) at datavis_a2.js:104 d3Force @ 3d-force-graph-vr.min.js:136 n.(anonymous function) @ 3d-force-graph-vr.min.js:133 (anonymous) @ datavis_a2.js:104

The relevant code is the following: const graph = ForceGraphVR() .d3Force('collision', d3.forceCollide(node => Math.cbrt(node.numLinks) * NODE_REL_SIZE))

Any idea what is the issue? Thank you so much for the amazing work.

vasturiano commented 5 years ago

@nitrosx I'm not able to reproduce. Does that error occur for you in any of the examples listed on: https://github.com/vasturiano/3d-force-graph-vr ? Also, which OS/browser are you using?

nitrosx commented 5 years ago

@vasturiano All the examples in git works perfectly. The same example works using 3d-force-graph. I'm using Chromium on linux. Let me know if you need any more info or if you need me to run any additional tests. Thanks

vasturiano commented 5 years ago

@nitrosx could you make a reproducible example, say on Codepen, so I can have a closer look at your example code?

nitrosx commented 5 years ago

I will, although it will take a couple of days or more