xxxxxxxxxx
54
//please follow the meteor by mouse
let paint_brush_x_pos;
let paint_brush_y_pos =0
let circle_x;
let circle_y;
function setup() {
createCanvas(600, 400);
background(1)
noStroke()
smooth()
paint_brush_x_pos = 10
}
function draw() {
//Meteor
fill(255,width-mouseX)
ellipse(paint_brush_x_pos,paint_brush_y_pos,20,20,10)
paint_brush_x_pos++
paint_brush_y_pos += 1;
fill(255,width-mouseX)
ellipse(paint_brush_x_pos,paint_brush_y_pos,20,20,10)
paint_brush_x_pos++
paint_brush_y_pos += -.5;
//Stars
fill(500,230,50)
ellipse(random(0,width), random(0,height), 3,3);
//square mouse star
fill (255,200,mouseX,mouseY)
square(mouseX,mouseY,10, width)
//sky background
fill(225,120,190,random(5, 5)); distcenter = dist(300, 200, mouseX, mouseY);
ellipse(mouseX * random (1, 1), mouseY * random (1, 1), distcenter);
fill(0,100,200,random(5, 5)); distcenter = dist(300, 200, mouseX, mouseY);
ellipse(mouseX * random (1, 1), mouseY * random (1, 1), distcenter);
}