In Phaser 4 I am trying to resize loaded svgs when the game size changes. When the svg is processed, I need to replace the current texture with the new texture. Can someone suggest how I can do that without the renderer breaking?
I have a function on my custom image object, that is called on the resize. I removed the texture, added the new texture under the same key and called setTexture again and it worked if there was only one Image object using that texture. But when the same texture was used by multiple Image objects then the renderer broke. My guess it that it tried to show a removed texture before the other images got processed.
It would probably work if I stored the list of all the “svg game objects” and processed them. But I would like to avoid having to manage an extra list. I guess you can not retrieve a list of objects that use a specific texture? That would make it much easier.