xxxxxxxxxx
let words = ["THE", "INFINITE", "DESIRE", "FOR", "GROWTH"];
let font;
function preload() {
font = loadFont("Akira Expanded Demo.otf"); // Make sure to load your custom font here
}
function setup() {
createCanvas(600, 800);
background(50, 38, 20); // Dark background to match the vibe
noLoop();
}
function draw() {
background(50, 38, 20); // Reset background each draw
// Draw random rectangles for background texture
for (let i = 0; i < 100; i++) {
fill(random(180, 210), random(130, 80), 0, random(150, 255));
let w = random(50, 100);
let h = random(20, 50);
let x = random(width);
let y = random(height);
rect(x, y, w, h);
}
// Draw layered text with variation in size and position
textFont(font);
textAlign(CENTER, CENTER);
for (let i = 0; i < words.length; i++) {
fill(255);
textSize(random(40, 80)); // Randomized text size for variety
let x = width / 2 + random(-20, 20); // Slight random position shift
let y = (height / (words.length + 1)) * (i + 1) + random(-10, 10);
text(words[i], x, y);
}
}
// Key press functionality for refreshing and saving
function keyPressed() {
if (key == 'r' || key == 'R') {
draw(); // Redraw the canvas with random elements when 'r' is pressed
}
if (key == 's' || key == 'S') {
saveCanvas("lal_processing.jpg"); // Save the canvas as a .jpg file when 's' is pressed
}
}