First of all, sorry for that weird title. I am still not sure what the right wording is here.
I am creating a spritesheet-loader for pixi.js projects which yields a Map of textures as the textures are loading.
Later I want to use these textures to create sprites (which have to be added to an pixi.js container). Every time the texture map gets larger (more textures loaded) the sprites map cell (which creates a map based on the map of the textures) is beeing re-run.
This creates some overhead, since sprites will be created which are already created before and beeing destroyed via the invalidation promise (and are removed from the pixi.js container).
I only want to create sprites which are new. For that I tried to create a mutable spriteCache and was looking for a difference between the cache and the actual new texture map. But this feels odd.
The whole thing is kinda like d3-selection, but instead of the DOM I want to use the pixi.js container model.