xxxxxxxxxx
x = 0
going = true
function setup() {
createCanvas(800, 800,WEBGL);
background(255);
}
function draw() {
push()
fill(frameCount*5%255,frameCount%255,frameCount*3%255,frameCount%255)
rotate(frameCount*0.01)
torus(mouseX,mouseY)
pop()
//if (going) { going = torus(mouseX,mouseY) }}
rotate(frameCount*0.01)
fill(0,random(255))
box(x)
if (going) {x = x+1}
else if (!going) {x = x -1}
}
function mousePressed () {
background (255)
//strokeWeight(random(1,5))
//stroke(random(255),random(255),random(255))
if (going) {going = false} else{going = true}
}
//if (going) { going = true} else{ going = false} }