From 7ee4bb478d2e791d683ed3ff3c7006b73e2a2713 Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Fri, 7 Jul 2023 20:19:57 +0000 Subject: [PATCH] turn --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index ca67b1b..34b9112 100644 --- a/index.html +++ b/index.html @@ -82,7 +82,9 @@ var header = document.getElementById("header"); 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 requestAnimationFrame(update);