Hi developers, I’m building a web app and need your advice.
I tried to follow the same idea of injecting the viewer into Nuxt components as it’s done in the main speckle-server
solution. Everything worked fine when I was only loading one model at startup. At that point, a SpeckleLoader
instance was created to load the model.
However, the requirements changed. Now I need to load additional models after the first one is opened. As a temporary solution, I created a separate component that uses the same viewer instance but creates a new SpeckleLoader
to load these additional models.
Here’s my question: is it better to reuse the original SpeckleLoader
, or is creating a new one for each batch of models a valid approach?
I’ve started noticing strange issues—like the section box resetting unexpectedly and inconsistent model loading. I’m beginning to suspect that creating multiple loaders might be conflicting with the viewer’s state.
Thanks!