Created
October 4, 2018 15:36
-
-
Save kourindouhime/93606fb31d531d307ca95f0426a1fc10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
var items = document.getElementsByTagName("*"); | |
var ebashilovo = false; | |
setInterval(function() { | |
if (ebashilovo == true) { | |
for (i of items) { | |
i.style.transform = "translate("+getRandomInt(0,10)+"px,"+getRandomInt(0,10)+"px)"; | |
} | |
} | |
},10) | |
ebashilovo = true |
(() => {
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
var items = document.getElementsByTagName("*");
var ebashilovo = false;
setInterval(function() {
if (ebashilovo == true) {
for (i of items) {
i.style.transform = "translate("+getRandomInt(0,50)+"px,"+getRandomInt(0,50)+"px)";
i.style.transform = "rotate("+getRandomInt(-10,10)+"deg)";
}
}
}, 30);
ebashilovo = true;
})()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i.style.transform = "rotate("+getRandomInt(-10,10)+"deg)";