xxxxxxxxxx
46
/*
----- Coding Tutorial by Patt Vira -----
Name: Wiper Typography
Video Tutorial: https://youtu.be/HLRtRSuoY8A
Re-creation of work by Jongmin Kim: https://www.youtube.com/@cmiscm
Connect with Patt: @pattvira
https://www.pattvira.com/
----------------------------------------
*/
let font; let alphabets = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
let letters = []; let num = 30;
let wiper;
function preload() {
font = loadFont("fonts/BebasNeue-Regular.ttf");
}
function setup() {
createCanvas(500, 200);
angleMode(DEGREES);
wiper = new Wiper();
for (let i=0; i<num; i++) {
letters[i] = new Letter();
}
}
function draw() {
background("#007bbf");
wiper.update();
wiper.display();
for (let i=0; i<num; i++) {
letters[i].update(wiper.w1, wiper.w2, wiper.speed);
letters[i].display();
}
}