Format and update

This commit is contained in:
2025-03-09 15:23:10 +01:00
parent 7435e91b07
commit 3fe9ecbbb8
6 changed files with 1683 additions and 3538 deletions

View File

@@ -27,14 +27,12 @@
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data)
console.log(data);
if (data.refresh && image) {
image.src = `/background_image?${Math.random()}`;
image.src = `/background_image?${Math.random()}`;
return;
}
else {
} else {
for (const tracker of data) {
tracker.x *= width;
tracker.y *= height;
@@ -63,13 +61,11 @@
width = image?.getBoundingClientRect().width ?? 0;
height = image?.getBoundingClientRect().height ?? 0;
});
</script>
<svelte:window onresize={resize} />
<div class="flex h-screen items-center justify-center w-screen">
<div class="w-20 mr-auto"></div>
<div class="flex h-screen w-screen items-center justify-center">
<div class="mr-auto w-20"></div>
<div class="relative">
<img
src="/background_image?342038402"