Here’s the codesandbox for reproduction.
Steps to reproduce:
- Observe the visible line in the first view
- Click the “Change View” button
- Observe the missing line in the second view (line is present in the code)
- Resize the application window in any way (i.e making the code panel bigger/smaller)
- Observe that the previously missing line is now visible
This behavior continues to happen every time the view is changed (i.e going back to the original view will now have the line missing until window resize). From my testing, lines are the only object that this happens with. Am I going about switching views wrong?
Side note: I don’t know why, but it seems as though the
domElement refs for the
OrbitControls need to be flipped in order for them to work properly across each view. In my application, I have found that using the yomotsu camera controls fixes this problem. Could be unrelated, but just putting it out there.