SketchBook

CL冬休み

var diameter;Object

diameter=20

function setup() {
createCanvas(700, 700);
}

function draw() {
background(250, 250, 250);
fill(0,191,255);
ellipse(350,350,350);
fill(255,255,255);
ellipse(350,395,320,255);
ellipse(320,270,65,80);
ellipse(385,270,65,80);
fill(0,0,0);
ellipse(328,280,20,30);
ellipse(373,280,20,30);
fill(255,255,255);
ellipse(328,280,10,15);
ellipse(373,280,10,15);
fill(0,0,0);
line(300,330,230,300);
line(300,340,220,340);
line(300,350,230,380);

line(400,330,470,300);
line(480,340,400,340);
line(400,350,470,380);

line(260,440,440,440);

var from = color(250, 250, 250);
var to = color(300, 10, 20);
if (mouseIsPressed)
fill(lerpColor(from, to, 0.8));
else
fill(lerpColor(from, to, 0.2));
line(0, mouseY, 700, mouseY);
line(mouseX, 0, mouseX, 700);
ellipse(mouseX, mouseY, 40);
}