xxxxxxxxxx
46
/*******************************************************
HIIIIII Y'ALLLL!!!!
First slider is Amplitude. Second slider is Frequency.
And third is font size cuz i dont feel like making it
responsive to input text. >w<
to save as gif uncomment the line 29 and run.
The first parameter is gif name, the second parameter is gif duration
you can change either of that.
*******************************************************/
/******************** input text **********************/
let bungus = "hi y'all swag !!";
/******************************************************/
let freq = 1
let ampli = 1
function preload(){
gf = loadFont('glumbofont.ttf')
}
function setup() {
createCanvas(400, 400);
amp = createSlider(0, 200, 9 ,1);
freq = createSlider(0, 1, 0.35,0.01);
font = createSlider(0, 80, 20, 0.1);
//saveGif('myGlumbotron',5)
}
function draw() {
let tfont = font.value()
background(77, 0, 77);
textFont(gf);
textAlign(CENTER);
textSize(tfont);
fill(240,95,240); //glumbo poiple
//fill(255, 255, 51); //glumbo yoilow
//fill(153, 255, 204); //glumbo coiyan
for(let i=0;i< bungus.length;i++){
let tamp = amp.value()
let tfreq = freq.value()
text(bungus[i],50+(tfont*i),tamp*sin(((frameCount+i)*tfreq))+200)
}
}