Volumetrics-io / mrjs

An extensible WebComponents library for the Spatial Web
https://mrjs.io
MIT License
148 stars 9 forks source link

`MREntity`: Garbage Collect geometries and Materials in `disconnectedCallback()` #598

Closed michaelthatsit closed 2 months ago

michaelthatsit commented 2 months ago

Notice in sol-garden. @lobau is creating new maps on the fly, but the old ones stay in memory causing a perf hit.

If we add disconnectedCallback() to MREntity and have it traverse it's object hierarchy and dispose all materials and geometries, it should resolve the issue