For simple Models this works, but for more complex models, I get an error while rendering, when I enable “shareEdgesWithInstances” on the original meshes, shown in this very short Demo:
Then I get “Uncaught TypeError: Cannot set property ‘0’ of undefined” while rendering.
I have also included a simpler model - commented out - consisting of just a few boxes. that one works fine every time. So it has to be something with the complexity that triggers this error.
When I looked at this in the npm project (currently not availably) it was something about copying a 16-values Array somewhere in “instancesData” but this array was undefined (hence the error). So some incances - or base meshes - don’t carry the infomation needed for instance edges rendering like it seems.
Currently I circumvent this problem by calculating the edges even for the instances which almost doubles the time for preparation.