xxxxxxxxxx
43
var rot = 0;
var speed = 0.00;
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
// clear background
background(255);
// rotate a single line
push()
translate(width/2, height/2);
rotate(rot+=speed);
line(-26, -26, 52, 52);
pop()
push()
rotate(rot+=speed);
line(0, 0, 52, 52);
pop()
if(mouseX >= width / 2){
rot = rot + 0.01
} else {
rot = rot - 0.01
}
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
function mouseMoved(){
}