SketchBook

touch me!

var diameter;

function setup() {
createCanvas(windowWidth,
windowHeight);
background(700, 700, 700);
frameRate(10);
noStroke();
noFill();

diameter = 150;
}

function draw() {
fill(0, 0, 0);
 text("画面ををタップ!!", 50, 50);

if (mouseIsPressed) {
stroke(70, 150, 20, 60);
noFill();
translate(mouseX, mouseY);
for (var i = 0; i < TWO_PI; i += 0.1) {
var x = diameter * cos(i);
var y = diameter * sin(i);
ellipse(x, y, 450);
}
}
}