procedural shuffle update
This commit is contained in:
parent
f92410f38a
commit
b55bc7c11e
6 changed files with 65 additions and 19 deletions
20
subsystem/subres/shuffle.js
Normal file
20
subsystem/subres/shuffle.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
function socialShuffle() {
|
||||
// Shuffle nav bar
|
||||
let shuffle = document.getElementById("headnav");
|
||||
let rnd = Math.round((Math.random() * (1.5 + 1.5) - 1.5) * 100) / 100;
|
||||
shuffle.style.transform = "rotate(" + rnd + "deg)";
|
||||
|
||||
// Shuffle bar behind nav
|
||||
shuffle = document.getElementById("bnav");
|
||||
rnd = Math.round((Math.random() * (1.5 + 1.5) - 1.5) * 100) / 100;
|
||||
shuffle.style.transform = "rotate(" + rnd + "deg)";
|
||||
|
||||
// Shuffle social bar
|
||||
shuffle = document.getElementById("socials");
|
||||
rnd = Math.round((Math.random() * (1.5 + 1.5) - 1.5) * 100) / 100;
|
||||
shuffle.style.transform = "rotate(" + rnd + "deg)";
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
socialShuffle();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue