xxxxxxxxxx
42
let img=[];
function setup() {
createCanvas(2048/2 , 1536/2)
scribble = new Scribble();
//noLoop();
frameRate(5);
background(255);
let counter=1;
for (let i=0; i<52; i++){
img[i] = loadImage("type-brut/Asset "+counter+".png");
counter++;
if (counter==26){
counter=1;
}
}
}
function draw() {
background(255);
stroke("#B13430");
strokeWeight(int(random(1, 3)));
randomSeed(2);
scribble.scribbleFilling( [0, 0, width, width], [0, height, height, 0], 20, 60+frameCount );
//image(img, -200, 0);
for (let i=0; i<20; i++){
let pick =int(random(26));
let size=random(0.5, 1.5);
push();
translate(random(-100,width), random(-100, height));
rotate(random(-PI/4, PI/4));
image(img[pick], 0, 0, img[pick].width*size, img[pick].height*size);
pop();
}
}