xxxxxxxxxx
30
let v = 0;
let p = 0;
let t = 0;
function setup(){
createCanvas(windowWidth, windowHeight);
}
function draw() {
p=sin(v)*255;
t = abs(p);
background(t);
}
function touchMoved() {
v = v + 0.01;
}
function mouseWheel() {
v = v + 0.01;
}
/*function mouseWheel() {
if (event.deltaY > 0) {
v = v + 0.01;
}
else {
v = v - 0.01;
}
}*/