turn
This commit is contained in:
parent
bd9a1dff30
commit
7ee4bb478d
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Reference in a new issue