don't ask
seriously
JavaScript
framerate = 30;
text = 'PEEEEEEEEEEEEEEEEEEEEEEEEEEEEENNNNNNNNNNNNNNIIIIIIISSSS';
width = window.innerWidth;
height = window.innerHeight;
size = 72;
letters = new Array();
time = 0;
for (i=0; i < text.length; i++){
obj = document.createElement('div');
obj.innerHTML = text[i];
obj.style.font = size+'px Arial';
obj.style.position = 'absolute';
obj.x = width + i*size;
obj.y = height/2 - size/2;
letters.push(obj);
document.body.appendChild(obj);
}
function update(){
dt = 1/framerate;
time = time+dt;
for (i=0; i < letters.length; i++){
obj = letters[i]
obj.x = obj.x - 200*dt;
obj.y = height/2 - size/2 + Math.sin(obj.x/100 - time/2)*75;
if (obj.x < -letters.length*size){
obj.x = width;
}
obj.style.left = obj.x + 'px';
obj.style.top = obj.y + 'px';
}
setTimeout(update,dt)
}
update();