xxxxxxxxxx
40
off = 0;
y1 = 20;
x1 = 15;
y2 = -10;
x2 = -190;
count=0;
function setup() {
createCanvas(1600, 2000);
background(250);
textFont('futura');
textStyle(BOLD);
textSize(12);
ver=random(-100,height-100);
hor=random(-100,width-100);
space=random(50,300);
}
function draw() {
r = random(100, 250);
fill(237, 0, 115, r);
off = off + 0.3;
let nx = noise(off) * 10;
let ny = noise(off) * 2;
text("SMALL DOSES", x1 - nx, y1);
if (y1>ver && y1<(ver+space) && x1>hor && x1<(hor+150)){y1 = y1 + random(10,30)}
else (y1 = y1 + random(10));
if (y1 >= height - 10) {
x1 = x1 + 93;
y1 = 20+ny;
count=count+1;
}
if (count>16) {noLoop();}
}