How can I use globalCompositeOperation for erasing something?
http://canvaspaint.org/ has an eraser, but that's just a white line - ok only if your background is white...
I know you can use ctx.clearRect(). But it didn't really worked for me because while dragging a mouse with eraser (set to 8x8px) it only makes unconnected 8x8px squares - not really a smooth line.
Is there a way how to use globalCompositeOperation as an eraser?
Something like:
ctx.globalCompositeOperation = "___something___";
ctx.beginPath();
ctx.lineTo(mouseX , mouseY);
ctx.closePath();
Thank you.