So firstly Iām just a PlayCanvas user not related to the business
From looking at the engine code it would appear that the texture is uploaded from the canvas and then not automatically modified from it unless you call upload() again. So changing the canvas contents will not cause an issue for other textures.
The thing here is that you are making an engine to create a gallery - so yeah it does need to be handled in the engine, sadly itās your engine that has to do that! PlayCanvas is just providing you with a set of things on which you can draw textures etc. If you need to be able to handle many textures then itās up to you to deal with the fact that this will run the phone out of memory.
My suggestion is that you can have many images in the gallery and that you will store these images in an array of strings as their JPG representation. You will have a limited number of images that can be seen at any time, you will convert these images from the JPG to a Texture for PlayCanvas. As you move around the scene you will have new images becoming visible and others becoming invisible - you will write code to manage the textures.
So you create lets say 8 textures. This will mean that the maximum number of pictures that can be seen at the same time is 8.
In an update() function you will work out which gallery pics can be seen (they are in the camera frustum and oriented towards the camera).
So you can get the frustum from the current camera and then you could iterate through the paintings and check a bounding sphere to see if itās near viewable.
See this for a bit of help with frustums https://developer.playcanvas.com/en/api/pc.Frustum.html
There are lots of ways you could then manage the textures and images to ensure you allocate visible images to textures and allocate those textures to the right planes. I could go further with this but it would take some time to do that.
Basically Iām saying that there is quite a lot of work to do to create a non-naive implementation of a gallery. The way you are doing it is fine for a demo prototype but to allow more pictures you are going to have to bite the bullet and handle the fact your images are big when they are in a texture. So youāve got to keep them out of the textures when they arenāt visible and store them as JPGs.
This is really the meat of developments like this!!
By the way the way to store them as strings is to draw them to the canvas and then use the canvas function to encode them as a base64 version.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
Make sure you pass āimage/jpegā as the type as PNGs are a lot bigger.,