I'm pretty new with Processing.js and I was wondering why this simple mask is not working? I mean, I can display the image and the mask without any problem, but as soon as it reach the line img1.mask(mask1);
everything stop working.
/* @pjs preload="resources/images/1.jpg, resources/images/masks/1.jpg"; */
void draw(){
PImage img1 = loadImage("resources/images/1.jpg");
PImage mask1 = loadImage("resources/images/masks/1.jpg");
img1.mask(mask1);
image(img1, 0, 0);
}
I have read http://processingjs.org/reference/PImage_mask_/, but I don't see what i'm doing wrong :S Anyone have an idea ? Thanks