-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwizard.html
More file actions
63 lines (48 loc) · 1.27 KB
/
wizard.html
File metadata and controls
63 lines (48 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Just Wizard</title>
<meta name="description" content="Just Wizard (singular)">
<link rel="icon" type="image/png" href="favicon.jpg">
<meta name="robots" content="noindex">
<style>
* {
cursor: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
pointer-events: none;
background: darkred;
}
img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
}
</style>
</head>
<body>
<img src="wizard.webp" alt="Wizard">
<script>
let xPos = 0, yPos = 0;
let xVel = 3;
let yVel = 3;
function animate() {
let maxX = screen.width - window.outerWidth;
let maxY = screen.height - window.outerHeight;
xPos += xVel;
if (xPos > maxX || xPos < 0) xVel = -xVel;
yPos += yVel;
if (yPos > maxY || yPos < 0) yVel = -yVel;
window.moveTo(xPos, yPos);
window.requestAnimationFrame(animate);
}
window.requestAnimationFrame(animate);
</script>
</body>
</html>