set up script for header cooling
This commit is contained in:
parent
a8875b468b
commit
39178c3a6b
1 changed files with 21 additions and 2 deletions
23
index.html
23
index.html
|
@ -27,7 +27,7 @@
|
|||
list-style-type: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
#header {
|
||||
//text-transform: uppercase;
|
||||
color: #fff;
|
||||
text-shadow: -4px 4px #c91a29,
|
||||
|
@ -66,7 +66,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>awesome.colean.cc</h1>
|
||||
<h1 id="header">awesome.colean.cc</h1>
|
||||
|
||||
<img src="res/awdog.png" width="160"><br>
|
||||
awdog, the mascot of awesome
|
||||
|
@ -78,5 +78,24 @@
|
|||
<li><a href="proj/wolfystein.html">@Wolfystein3D</a></li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
var header = document.getElementById("header");
|
||||
|
||||
var prevTimestamp = 0;
|
||||
|
||||
async function update(timestamp) {
|
||||
// get dt
|
||||
let dt = (timestamp - prevTimestamp);
|
||||
prevTimestamp = timestamp;
|
||||
|
||||
header.style.transform = "translate(50px, 100px);";
|
||||
|
||||
// loop
|
||||
requestAnimationFrame(update);
|
||||
}
|
||||
|
||||
requestAnimationFrame(update);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in a new issue