3DTilesRendererJS icon indicating copy to clipboard operation
3DTilesRendererJS copied to clipboard

LRUCache: Use a shared unload function

Open gkjohnson opened this issue 5 years ago • 1 comments

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 => {
  
  // ...

};

gkjohnson avatar Apr 09 '20 22:04 gkjohnson

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.

gkjohnson avatar May 15 '20 20:05 gkjohnson