Check this, it doesn’t provide a code sample but the logic is sound and I can confirm it is working:
-
You need to download your image and create a pc.Texture. Here is a sample on how to manually create a pc.Texture from a remote source (it uses a video source, but using an Img element would be the same):
https://developer.playcanvas.com/en/tutorials/video-textures/ -
Then create manually a pc.Asset of type “texture” and assign your custom pc.Texture to it.