jscastro76 / threebox

A Three.js plugin for Mapbox GL JS, with support for animations and advanced 3D rendering.
Other
549 stars 145 forks source link

clear and objectsCache #397

Open Criska9527 opened 1 year ago

Criska9527 commented 1 year ago

Hello author, my premise question is in #395, I didn't describe the situation I was experiencing at that time, I apologize to you.

Now I write all my doubts here and hope to get a response from you

By querying the source code of the clear method, I found that as long as my clear selects dispose, then objectsCache will dispose all object objects, because this will cause my object's animation to terminate, I don't think this is reasonable, because my clear layername and the layername added to the model are not the same

Also, in the clear method, after the object is disposed, this.objectsCache does not perform the delete operation, which will cause me to add this model again, read the model from the cache, and then add it, and the addition will fail

Finally, I wish you good health and a happy mood