xxxxxxxxxx
82
let x = 300;
let y = 300;
let px = 300;
let py = 300;
let s = 300;
function setup() {
createCanvas(400, 400);
colorMode(HSB, 255);
}
function draw() {
blendMode(ADD);
translate(width/2, height/2);
push();
// frameRate(25);
// filter(BLUR, 2);
if (x < width || x > 0 || y < height || y > 0)
{
x = random(-400, 400);
y = random(-400, 400);
}
x += random(-380, 380);
y += random(-380, 380);
stroke(random(0,255), 115, 195, 10);
strokeWeight(2);
line(px, py, random(-400,400), random(-400, 400));
px = x;
py = y;
pop();
push();
noFill();
strokeWeight(0.5);
stroke(random(0, 55), 210, 235, 3);
ellipse(
random(-10, 10),
random(-10, 10),
s + random(-15, 25),
s + random(-25, 15)
);
noFill();
strokeWeight(1);
stroke(random(0, 255), 255, 255, 4);
ellipse(
random(-2, 2),
random(-2, 2),
s + random(-15, 10),
s + random(-10, 15)
);
pop();
}
function mousePressed() {
clear();
background(30);
}