3DTilesRendererJS
3DTilesRendererJS copied to clipboard
LRUCache: Use a shared unload function
Right now every tile gets its own function created but you should be able to set it per cache object:
const cache = new LRUCache();
cache.unloadCallback = tile => {
// ...
};
It's important for the callback to know which renderer to call "dispose" on so tiles get cleaned up in the right place. A this field could be added so the callback is fired with a certain scope but this seems low priority.