-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
143 lines (129 loc) · 4.37 KB
/
index.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!doctype html>
<html lang="en">
<head>
<title>Pokemon Red Map RL Visualizer</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
<link rel="apple-touch-icon" sizes="180x180" href="assets/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/icons/favicon-16x16.png">
<link rel="manifest" href="assets/icons/site.webmanifest">
<link rel="mask-icon" href="assets/icons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
height: 100%;
background-color: black;
}
#userForm {
display: none;
position: fixed;
top: 4rem;
left: 50%;
transform: translateX(-50%);
padding: 2rem;
border: 3px solid white;
border-radius: 3rem;
background-color: rgba(0, 0, 0, 0.5);
box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
color: white;
}
.form-group {
display: flex;
align-items: center;
gap: 12px;
}
#userForm label {
color: white;
font-family: "Inter", sans-serif;
font-size: 22px;
font-weight: 600;
width: 12rem;
display: block;
}
#userForm input[type="text"] {
font-family: "Inter", sans-serif;
font-size: 22px;
font-weight: 600;
background-color: transparent;
border: none;
border-bottom: 3px solid white;
color: white;
padding: 0.5rem;
width: 100%;
}
#userForm input[type="text"]:focus {
border-color: blue;
outline: none;
}
#statsDisplay {
position: absolute;
bottom: 10px;
right: 10px;
color: red;
font-family: 'Inter', sans-serif;
font-size: 18px;
}
#filterText {
position: absolute;
bottom: 1rem;
left: 1rem;
color: white;
font-family: 'Inter', sans-serif;
font-size: 24px;
opacity: 0;
animation: fadeInOut 6s forwards;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
10% {
opacity: 1;
}
66% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>
</head>
<body>
<form id="userForm">
<div class="form-group">
<label for="fname">Filter Users </label>
<input type="text" id="fname" name="fname" oninput="setUserFilter(this.value)"
onkeydown="return event.keyCode != 13;">
</div>
</form>
<div id="statsDisplay" style="position: absolute; bottom: 1rem; right: 1rem; color: red;">
<div id="envsCount">0 Environments Streaming</div>
<div id="viewersCount">0 Viewers Connected</div>
</div>
<div id="filterText">Press F to filter users</div>
<script src="pixi.js"></script>
<script src="visualizer_live.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
let form = document.getElementById("userForm");
let stats = document.getElementById("statsDisplay");
form.style.display = "none";
stats.style.display = "none";
document.addEventListener('keydown', function(event) {
if ((event.key === 'f' || event.key === 'F') && document.activeElement.id !== 'fname') {
form.style.display = form.style.display === 'none' ? 'block' : 'none';
statsDisplay.style.display = statsDisplay.style.display === 'none' ? 'block' : 'none';
}
});
});
</script>
</body>
</html>