Hello! I am trying to use Mapbox-gl and Three.js together but have one problem and two questions. The problem is that if I switch Mapbox styles with 3d model attached to it, my application crashes after several style switches (WEBGL context lost). I use React+Mapbox-gl+Three.js combo. I think the issue is that Three.js adding 3d model every time when I switch layer and doesn’t delete it on switch and it can cause this error. Is there a way to delete model (all models) every time on Mapbox style switch? And my second question is next: is it possible to not reload model every time I switch mapbox style? It works fine in Threebox library (Code example, Visual demo ) but I need to switch back to Three.js because Threebox has problem with Blender import coords positioning.
Here is my Codepen example with Three.js+Mapbox style switch: Codepen