xxxxxxxxxx
// Lomz 2023
// kolorfon v2.0
// https://www.lomz.net
let size;
let x;
let y;
let offset;
function setup() {
size = min(windowWidth, windowHeight);
createCanvas(size, size);
background("#DDD5BE");
stroke("#343434");
var palette = [
"#406BB3",
"#D2B75E",
"#343434",
"#9A6E3B",
"#E0D4C6",
"#466B3F",
"#D69E91",
"#C8C8CA",
];
x = size / 30;
y = random(size);
offset = 0;
for (let i = 0; i < 20; i++) {
y = random(size/5, size - (size / 5));
var rectHeight = random(size/50, size/10);
for (let i = 0; i < int(random(50)); i++) {
push();
noFill();
stroke("#343434");
strokeWeight(1);
x = map(noise(offset), 0, 1, size / 30, size - (size / 30));
if (random(1) < 0.05) {
push();
fill(palette[int(random(0, palette.length))]);
strokeWeight(0);
rect(x, y, rectHeight, rectHeight);
push();
stroke("#343434");
strokeWeight(1);
line(0, y, size, y);
pop();
pop();
}
if (random(1) < 0.03) {
push();
fill("#343434");
noStroke();
textSize(size/80);
push();
stroke("#343434");
strokeWeight(1);
circle(x, y, size / 150);
line(x, y, x, size - (size / 10));
pop();
text(int(random(0, 10)), x+10, size - (size / 10));
pop();
}
rect(x, y, rectHeight, rectHeight);
offset += 0.1;
pop();
}
}
}
function draw() {
}
// **************************
// * Save png *
// **************************
function keyTyped() {
if (key == "s" || key == "S") save("Title" + int(random(0, 1000)) + ".png");
}