This commit is contained in:
awesomeuser 2023-07-07 20:19:57 +00:00
parent bd9a1dff30
commit 7ee4bb478d

View file

@ -82,7 +82,9 @@
var header = document.getElementById("header"); var header = document.getElementById("header");
async function update(timestamp) { async function update(timestamp) {
header.style.transform = "translate(" + (Math.cos(timestamp / 1000) * 20) + "px, " + (Math.sin(timestamp / 1000) * 20) + "px)"; let t = timestamp / 500;
header.style.transform = "translate(" + (Math.cos(t) * 20) + "px, " + (Math.sin(t) * 20) + "px) rotate(" + (Math.cos(t) * -10) + "deg)";
// loop // loop
requestAnimationFrame(update); requestAnimationFrame(update);