xxxxxxxxxx
27
var chrono = 0; // chrono début 0
function setup() {
createCanvas(400, 400);
}
function draw() {
chrono ++ // ajoute 1 toute les 25eme secondes
background(220);
if ( chrono < 20){ // si chrono plus petit que 20 affiche mot 1
textSize(30);
text("test", 100, 100);
}
if (chrono > 20 & chrono < 40){ // si chrono plus grand que 20 et plus petit que 40 affiche mot 2
textSize(30);
text("vlan", 100, 100);
}
if (chrono > 40 & chrono < 60){ // si chrono plus grand que 40 etplus petit que 60 affiche mot 3
textSize(30);
text("pouf", 100, 100);
chrono = 0; // remet à 0
}
}