Hey there,
Here´s a alpha animation I work on as a beginner, starting immediately to fade out the shape containing a character array. That is okay.
var f = 255; //alpha variable
var speed = 0.1; // decreasing alpha multiplier
let shape1 = [
['','','1a','','',''],
['','1b','','1h','',''],
['1c','','','','1g',''],
['','1d','','1f','',''],
['','','1e','','',''],
['','','','','',''],
];
function setup() {
createCanvas(400,400);
}
function draw() {
background(220);
let w = width /5;
let h = height / 6;
//shape1
for (let j = 0; j < 6; j++) {
for (let i = 0; i < 5; i++){
let x = w * i ;
let y = h * j ;
let spot = shape1[j][i];
//textAlign(CENTER);
textSize(32);
// Before fade animation starts: How to keep the shape visible for 10 secs?
f -= speed;
fill(255,0,0, f);
text(spot, x + w,y);
}
}
}
BUT;
How to let it be visible for 10 seconds before the animation starts?
A cool future update may also be: How to make it visible again after 10 seconds of invisibility, too?
THX
BX