loop();
Allow lu5 to call the draw
function.
angle = 0;
radius = 100;
function setup()
createWindow(300, 300);
textAlign(CENTER);
noStroke();
end
function draw()
background('purple');
text('Click to pause', width/2, height/2);
circle(
radius * cos(angle) + 150,
radius * sin(angle) + 150,
16
);
angle = angle + 0.05;
end
function mousePressed()
noLoop();
end
function mouseReleased()
loop(); -- Start back the loop
end
Output