How can I use globalCompositeOperation with KineticJS? I've seen a couple of examples where a custom function is created but they all seem out of date and don't work anymore.
I'm trying to create an app where a shape (like a circle) can be moved around the canvas and reveal the image below it and then locked into place to create the image mask.
It seems that using a composite would be better than trying to use a fillImagePattern. Any ideas would be greatly appreciated.
Thanks, - Chris
Here’s how to use globalCompositeOperation in KineticJS to do a “reveal”
The method is:
Of course, if your design allows a rectangular “reveal”, you can just create a clipping region.
Here is code and a Fiddle: http://jsfiddle.net/m1erickson/QcnHa/