xxxxxxxxxx
59
let currentT = 0;
let lastTextChangeTime = 0;
let textChange = 30000;//kathe 30deutera
let currentText;
let lastTextTime = 0;
function setup() {
createCanvas(windowWidth,windowHeight);
colorMode(HSB,360,100,100);
}
function draw() {
background(frameCount%360, 100, 100, 0.01);//1''
colorMode(RGB);
noStroke();
fill(360-frameCount%360);
ellipse(mouseX,mouseY,45,45);
colorMode(HSB)
//stoxos einai na piaseis tin💜
textAlign(CENTER, CENTER);
let louloudia = ["🍓🐝🥕🌺 ", "🍇🌼🐛", "🐍🌊🧿", "🍄🍑 🐭💐", "🍉🦢🦠🥀 ", "🌈☀️🐞🧸 ", "🍒 💜🌻", "🌸🔥🐋🍷 ", "🍋🌷❤️"];
let textString = louloudia[currentT];
let yPosition = 100;
for (let i = 0; i < yPosition.length; i++) {
let x = mouseX;
let y = yPosition[i];
textSize(15)
text(louloudia, x, y);
}
let xPosition = [100, 250, 400, 550, 700, 850, 1050, 1200];
for (let i = 0; i < xPosition.length; i++) {
let x = xPosition[i];
let y = mouseY;
textSize(15)
text(textString, x, y);
}
if (millis() - lastTextChangeTime > textChange) {
currentT = (currentT + 1) % louloudia.length;
lastTextChangeTime = millis();//allazei kathe 30''
}
if (millis() - lastTextTime > 5000) { currentText = random([" ❤️", "🧡", "💛", "💜", "🤍"]);//kathe 15'
textSize(40);
text(currentText, random(width), random(height));
lastTextTime = millis();
}
}
function mousePressed(){
let fs=fullscreen();
fullscreen(!fs);
}
function windowResized(){
resizeCanvas(windowWidth,windowHeight);
}