So i have to make spawn Random Howls with random abscissa, size, and grey shades.
The problem is that they are spawning and they disappear and i don’t want them to disappear
here’s the code.
function setup(){
createCanvas(480,120);
}
function draw(){
background(204);
for(var x=random(0,width); x<width; x+=random(0,width))
{
var gris=int(random(0,102));
var echelle=random(0.25,1,0);
chouette(x,115,gris,echelle);
}
}
function chouette(x,y,g,e){
translate(x,y);
scale(e);
stroke(g);
strokeWeight(70);
line(0,-35,0,-65);
noStroke();
fill(random(0,255));
ellipse(-17.5,-65,35,35);
ellipse(17.5,-65,35,35);
arc(0,-65,70,70,0,PI);
fill(0);
ellipse(-14,-65,8,8);
ellipse(14,-65,8,9);
quad(0,-58,4,-51,0,-44,-4,-51);
pop();
}
I think u should use array and the function push(); but i don’t really understand how it is working thanks for the answer(s).