I have a bunch of animated gltf models which should be outlined when user hover on any of it. I think OutlinePass should work well. Actually, when I apply OutlinePass to spheres, it works well as expected. But when I did the exactly same thing to my gltf models, it throws an error:
I have three different models in total. Everytime I only use one of them like generating 50 of this very type of model, only the most complicated one throws this error. For the other two, it’s not perfect as well. Users can change model type when the application is running. If the model type changes up to 3 times, the same error will be thrown as well.
What I’ve done to the models is the same as https://github.com/mrdoob/three.js/blob/d4a7b696da669c32ad19ee057c9c4481de087df2/examples/webgl_postprocessing_outline.html
I try to find the root scene object of the model which intersects raycaster and add it to OutlinePass.selectedObjects.
This error is related to this line in three.min.js:
The
w
in line 40 is not expected to be undefined
here. But I know little about source code of three.js. I tried to find out what this w
is but I can’t really understand it.
Can somebody help me with this error?