Because of the bottle shape, I am currently using a rectangular layer to cover the image of a full bottle water.
I draw an empty bottle on top of the over lay. As I resize the overlay height, it creates an animation of the water going up.
However, I have the problem with the overlay. As it keeps getting resized, the overlay become more visible to the background.
I was wondering if there a way I can crop the image instead of resizing it. Or if there any other way to make this animation work.
PImage a; PImage b; PImage c; PImage d; void setup() { b = loadImage("vol_pipette.png"); a= loadImage("overlay.png"); c= loadImage("beaker.png"); d= loadImage("liquid.png"); size(980, 920); frameRate(45); } int h2=0; int h1=0; int h=0;