Since there were a few repeatable items in the code for the last project. I tried to use a for loop which yielded interesting results.
function preload() {
img = loadImage(“./assets/le-logo-du-poing-leve-des-black-panther.png”);
mySound = loadSound(‘./assets/Steel Pulse – Uncle George.mp3’);
}
var x, y;
//word loc is word location x
//worloc2 is word location y
//ts is text size
var wordlocX = -5;
var wordlocY = 400;
var ts = 8;
function setup() {
createCanvas(1920, 1080);
frameRate(60);
mySound.setVolume(0.1);
mySound.play();
}
function draw() {
// On mouse click change bg color for a sexy party
// Display moving text that says “power to the people”
{
background(random(225, 255), 100, random(50, 150));
image(img, 500, 200);
ts++
stroke(0, 10)
//for (start; end; incremment){}
for (var i = 0; i < 10; i++) { fill(255, 50 * i); textSize(ts+10*i); text(“Power to the People”, wordlocX, wordlocY – i * 10); //do something print(i); } if (frameCount >= 127) {
ts = 150
}
}
}