Hey R0J0hound
Is there any way I can paste an object on the canvas specifying the alpha and maybe size and position?
My situation is this: I have two shapes, let's say two circles; one circle is in the middle of the canvas and the other one is bound to mouse XY, every tick the mouse-bound circle is being pasted with destination-out and the other circle is being pasted on another canvas in a way similar to this:
for (var i = 0; i < 20; i ++) {
var size = 128 + i * 10;
var halfthatsize = size * 0.5;
var x = 256 - halfthatsize;
var y = 256 - halfthatsize;
context.globalAlpha = (256 / ((i + 4) * (i + 4) * 20));
context.drawImage(shape, x, y, size, size);
}
I can achieve the above code with sprite events but when I erase with destination out I obviously can't paste the updated shape.
EDIT: I used another Canvas object that I then paste in the main canvas. It works but it's a hacky way of doing it and it looks like the quality gets lost in the pastings.