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

followPath and clear #395

Closed Criska9527 closed 1 year ago

Criska9527 commented 1 year ago

When I call the method tb.clear('layeris', true), the followPath process for the model being executed stops

jscastro76 commented 1 year ago

That's because you're basically disposing all the resources in that layer. It's not a bug

Criska9527 commented 1 year ago

Thank you for your patience, but according to the design of the system layer concept, my model is loaded in layer A, but when I use clear to clear layer B, the resources in layer A should not be released

Criska9527 commented 1 year ago

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 @jscastro76