xxxxxxxxxx
let x, y, r, g, b;
function setup() {
createCanvas(windowWidth, windowHeight);
background(255, 105, 180, 255);
}
function draw() {
r = random(50, 255);
g = random(110, 200);
b = random(0, 255);
x = random(width);
y = random(height);
noStroke();
fill(r, g, b, 100);
ellipse(x, y, 20, 20);
var speed = dist(mouseX, mouseY, pmouseX, pmouseY);
if(speed>0) mouseangle = atan2((pmouseY-mouseY),(pmouseX-mouseX));
strokeWeight(speed);
stroke(255, 135, 180);
if (mouseX > 700){
fill( 0, 191, 255);
}
if (mouseX <700){
fill( 244, 164, 96);
}
if (mouseY >300){
fill(238, 130, 238,);
}
ellipse(mouseX, mouseY, random(80), random(80));
}
function keyTyped() {
if(key=='q') {
background(255);
thesize = 1;
}
if(key=='w') {
background(0, 255, 255);
thesize = 1;
}
if(key=='e') {
background(255, 220, 180, 255);
thesize = 1;
}
}
function mousePressed() {
clear();
background(255, 105, 180, 255);
}