Generating transparent image in PlayCanvas

Actually, I’m not sure that does what I thought it does as setSource only accepts HTMLCanvasElement|HTMLImageElement|HTMLVideoElement|HTMLCanvasElement[]|HTMLImageElement[]|HTMLVideoElement[]

I think you would have to apply the screencapture to a DOM element, change the pixel data there and use it as a source for texture.

Alternatively (and might be easier), you could create a shader for the material that does a colorkey / chromo key effect similar to what’s been done here: Big size video lags