Content
@
0 reply
0 recast
0 reaction
LGHT
@lght.eth
2 replies
3 recasts
23 reactions
MBStuart π© β
@stustustudio
let currentNumber; let increment; let lastUpdateTime; function setup() { createCanvas(600, 800); textAlign(CENTER, CENTER); textSize(69); fill(0); // Initialize starting number and increment currentNumber = int(random(1, 1000000)); increment = int(random(1, 21)); lastUpdateTime = millis(); } function draw() { background("#9b8168"); rotate(.03); let textToDisplay = `I HAVE\n${nfc(currentNumber)}\n REASONS\nTO BE HAPPY`; text(textToDisplay, width / 2, height / 2); // Update the number every second if (millis() - lastUpdateTime >= 1000) { currentNumber += increment; lastUpdateTime = millis(); } }
1 reply
0 recast
0 reaction
LGHT
@lght.eth
ideas: change font to helvetica bold with -7% letter spacing set min number in range to 444437 and max number at 1,000,000,000 randomize bg color as well
3 replies
0 recast
1 reaction
MBStuart π© β
@stustustudio
might be fun to rando array some words to: I, You, We, Find Happy, Thankful, Grateful, Present
1 reply
0 recast
1 reaction
MBStuart π© β
@stustustudio
Love it! Thanks for input - posted update π€
0 reply
0 recast
1 reaction
MBStuart π© β
@stustustudio
let currentNumber; let increment; let lastUpdateTime; let bgColor; function setup() { createCanvas(600, 900); // Set font to Helvetica Bold textFont('Helvetica'); textStyle(BOLD); textAlign(CENTER, CENTER); textSize(69); // Initialize starting number and increment currentNumber = int(random(444437, 1000000000)); increment = int(random(1, 21)); lastUpdateTime = millis(); // Randomize background color bgColor = color(random(255), random(255), random(255)); } function draw() { background(bgColor); // Apply -7% letter spacing textTracking(-7); // Dynamic text let textToDisplay = `I HAVE\n${nfc(currentNumber)}\n REASONS\nTO BE HAPPY`; text(textToDisplay, width / 2, height / 2); // Update the number every second if (millis() - lastUpdateTime >= 1000) { currentNumber += increment; lastUpdateTime = millis(); } } // Function to apply letter spacing function textTracking(amount) {let step = textWidth(' ') * (amount / 100); drawingContext.letterSpacing = `${step}px`; }
0 reply
0 recast
1 reaction