3d-force-graph icon indicating copy to clipboard operation
3d-force-graph copied to clipboard

Following Custom Node Geometries example leads to console warning for multiple instances of Three.js being imported.

Open mcclown opened this issue 1 year ago • 2 comments

Describe the bug

See image of console log below:

image

To Reproduce Steps to reproduce the behavior:

  1. Go to "here""
  2. Look at the browser console logs

Expected behavior A way to include three.js without a warning and multiple, potentially conflicting imports. I have tried using the same version of Three.js that is used in the latest release of 3d-force-graph (0.139) but it still gives the warning.

mcclown avatar Jul 25 '22 14:07 mcclown

I have seen the same issue. But at the moment the example does not work at all. I get.

Uncaught ReferenceError: THREE is not defined

But THREE is defined - and is 157.

The 3d-force-graph library is great. But I think it has to switch to es6 modules. I think THREE.js has done that already. I see this:

Scripts "build/three.js" and "build/three.min.js" are deprecated with r150+, and will be removed with r160. 
Please use ES Modules or alternatives: https://threejs.org/docs/index.html#manual/en/introduction/Installation

lborgman avatar Jan 31 '24 22:01 lborgman

Hm, I just noticed that "build"-versions were removed after r160 (se my previous comment). Which explains the extra trouble I saw today. (I switch to loading r160 in my own code.)

lborgman avatar Jan 31 '24 23:01 lborgman