Open fritx opened 7 years ago
I get this too. I'm also using Vue and my own build of three.js, but I'm ensuring my three.js build is used everywhere (I don't have two copies). I'm using webpack and loading three as a module: import * as Three from 'three'
and then setting window.THREE = Three
for this inspector.
I'm also doing InspectedWin3js.getInspectedScene = function() { return window.scene; }
in the console (as referenced in a different issue) because the inspector doesn't find my scene unless I do that. But once I do, I get dropped into the debugger at this "dafuc" line and can't get any further.
I also get this error every time I select an object. Doesn't happen to all objects. I have some generated meshes that are selected fine and some loaded meshes that produce this error. I'm not using Vue.
if (object instanceof THREE[ InspectedWin3js._threeJSClassNames[ j ] ])
I guess, we should have another way to take place of instanceof
detection,
since it would break if there are multiple THREE
instance, in my case above
Just fyi this is still broken
https://github.com/jeromeetienne/threejs-inspector/blob/cb2cf92accb3fb921e260e50c2c662c10312b8ae/src/panel/inspected-win/10-inspected-win-classnames.js#L6-L15
That was interesting.
I was running a vue application in my computer. I had
three
andvue-threejs
as dependencies.I was npm-linking the
vue-threejs
locally, so that I could use my local version. However,vue-threejs
included athree
in its devDependencies, instead of expected one in my vue application! (I think it was due to the behavior of node_modules search..)So there are TWO different versions of
three
, when I run my vue application!! (I know that was an edge case.)Now my solution is to npm-link
three
in both projects, so that thethree
can be one single version in them.Should threejs-inspector consider the case or not?