Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setInterval("glitch()", 5000);
- dolo = true;
- function glitch(){
- setTimeout("glitchanim()", 200);
- setTimeout("glitchanim()", 300);
- setTimeout("glitchanim()", 400);
- setTimeout("glitchanim()", 500);
- setTimeout("glitchanim()", 700);
- setTimeout("glitchanim()", 800);
- setTimeout("glitchanim()", 900);
- setTimeout("glitchanim()", 1000);
- setTimeout("glitchanim()", 1100);
- setTimeout("glitchanim()", 1200);
- setTimeout('document.getElementById("caniumlogo").style = "visibility:show;"; document.getElementById("caniumlogo").style = "transform: scale(1,1);";', 1200);
- }
- function glitchanim(){
- if(Math.round((Math.random() * 1) + 0) === 0){
- document.getElementById("caniumlogo").style = "transform: scale(" + getRandomArbitrary(0, 1)+"," + getRandomArbitrary(0, 1) + ");";
- }else {
- if(dolo){
- document.getElementById("caniumlogo").style = "visibility:hidden;";
- dolo = false;
- } else {
- document.getElementById("caniumlogo").style = "visibility:show;";
- dolo = true;
- }
- }
- }
- function getRandomArbitrary(min, max) {
- return Math.random() * (max - min) + min;
- }
Add Comment
Please, Sign In to add comment