Browse Source

last of today

master
Gustavo Adolfo Mesa Roldan 5 years ago
parent
commit
edc21f1fb3
1 changed files with 19 additions and 23 deletions
  1. +19
    -23
      index.html

+ 19
- 23
index.html View File

@ -83,42 +83,38 @@
function rn(min, max){
return Math.floor(Math.random() * (max - min + 1) + min)
}
var r = rn(0,255),
g = rn(0,255),
b = rn(0,255),
var c = [rn(0,255), rn(0,255), rn(0,255)],
r = rn(0,2),
direction = rn(0,1),
letters,
countLetter,
thisLetter = 0;
function colorizer(){
var time = 1;
/* r = rn(0,255),
g = rn(0,255),
b = rn(0,255),*/
if (r < 256){
r++;
}else{
if (g < 256){
g++;
now = $(letters[thisLetter]).html()
if (c[r] > 0 && c[r] < 255){
console.log(direction);
console.log(c[r]);
console.log(c);
if(direction){
c[r]++;
}else{
if (b < 256){
b++;
}else{
r = rn(0,255),
g = rn(0,255),
b = rn(0,255)
}
}
c[r]--;
}
}else{
r = rn(0,2),
direction = !direction;
c[r] = c[r] >= 255 ? 250 : c[r]
c[r] = c[r] <= 0 ? 1 : c[r]
}
now = $(letters[thisLetter]).html()
$(letters[thisLetter]).html("|")
if (now != " " && now != "░"){
time = 50;
now = "█";
$(letters[thisLetter]).css({color: "rgb("+r+" ,"+g+" ,"+b+" )"})
$(letters[thisLetter]).css({color: "rgb("+c[0]+" ,"+c[1]+" ,"+c[2]+" )"})
}else{
now = "░";
$(letters[thisLetter]).css({color: "white"})


Loading…
Cancel
Save