views:

25

answers:

1

How do I blend these two sets of pixelData?

The maskArray specifies the pixels to use from the OverlayData. These need to be merged with the backgroundData, and inserted back into the main canvas as newBackgroundData, and as offsetX changes update as needed.

update I think I have found a solution: simply create another hidden canvas, and then using drawImage back into the main canvas, preserving any transparency.

alt text

A: 

I played a bit with this a while ago. Have a look at what I did to see how I blend together different layers: http://www.tistron.se/animation2.html

ormuriauga
cool thanks. will check it out.
davivid