xxxxxxxxxx
24
let water;
function preload() {
water = loadImage("waterlayer.png");
}
function setup() {
createCanvas(400, 400);
imageMode(CENTER);
}
function draw() {
background(220);
push();
translate(width/2, height/2);
rotate(sin(frameCount*0.1)*0.013);
// translate(sin(frameCount*0.005)*15, cos(frameCount*0.005)*15);
let s = sin(frameCount*0.03);
s = map(s, -1, 1, 0.95, 1.03)
scale(s);
image(water, 0, 0, width/2, height/2);
pop();
}