Quantcast
Channel: Only have globalAlpha effect one layer of a canvas? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Kaiido for Only have globalAlpha effect one layer of a canvas?

You can have layers with canvas. The idea is that each layer will be an off-screen canvas, that you will draw in proper order on the main, on-screen canvas.Using your code, it would give something like...

View Article



Answer by Blindman67 for Only have globalAlpha effect one layer of a canvas?

Hope I got this right. Image to fade from black while background blue/cyan is not affected.You need to use the ctx.globalCompositeOperation (GCO) and it is a little counter intuitive. First clear the...

View Article

Only have globalAlpha effect one layer of a canvas?

I'm trying to use globalAlpha to 'fade out' the top layer of my canvas, to revel a middle layer image, and a solid background color. I'm using the code below, which successfully fades out the black...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images