vasturiano/3d-force-graph-vr

Uncaught TypeError: Cannot read property 'components' of undefined

nitrosx opened this issue · 4 comments

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.

@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?

@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

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

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