xxxxxxxxxx
let f = ['cairo', 'tajawal', 'marhey', 'amiri', 'alkalami', 'rakkas', 'harmattan','jomhuria','noto sans arabic'];
let num = 6;
let startUnicode = 1571;
let endUnicode = 1610;
let counter = startUnicode;
let alphabet = [];
let charChange = 0;
let seed;
function setup() {
createCanvas(800,800);
textAlign(CENTER, CENTER);
textSize(1000);
noCursor();
seed = random(0, 100);
for (let i = 0; i < endUnicode + 1 - startUnicode; i++) {
alphabet[i] = char(counter).toUpperCase();
counter++;
}
}
function draw() {
randomSeed(seed);
for (let y = 0; y < height; y += height / num) {
for (let x = 0; x < width; x += width / 20) {
drawingContext.save();
noStroke();
fill(243,177,219);
rect(x, y, height / num);
drawingContext.clip();
fill(252,43,10);
textFont(f[int(random(f.length))]);
text(alphabet[charChange], width / 2, height / 2);
drawingContext.restore();
}
}
if (frameCount % 20 === 0) {
if (charChange < 25) {
charChange++;
} else {
charChange = 0;
}
seed++;
}
}