let img;
let diameter;
function preload(){
img=loadImage("images/blog.png");
}
function setup() {
createCanvas(1280,720);
imageMode(CENTER);
}
function draw() {
background(255,0,245,1);//purple color
diameter=map(mouseX,0,width,10,700);
image(img,width/2,height/2,diameter,diameter);
line(200,700,200,5);
line(1060,700,1050,5);
strokeWeight(1);
stroke(0);
if(mouseIsPressed){
stroke(0);
}else{
stroke(255,255,0,1);
}
fill(255,255,1,255);//yellow color
stroke(5);
ellipse(mouseX, mouseY,30,20);//moving round shape
ellipse(130,130,250,250);//static round shape upper left
fill(255,1,0,255);
ellipse(1150,498,250,255);//color red
}
Comments
Post a Comment