From 738e92c16bccde6e9fcb9e6e0cd1b246f3fb7ef8 Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 11 Oct 2023 20:44:26 +0200 Subject: [PATCH] "you are here" in favicon (idea from Yves) --- favicon.ico | Bin 0 -> 762 bytes favicon.php | 38 +++++--------------------------------- index.html | 6 +++--- main.js | 6 ++++++ 4 files changed, 14 insertions(+), 36 deletions(-) create mode 100644 favicon.ico diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6d53b704de3912e7f7b5035e7864096bd96bdd21 GIT binary patch literal 762 zcmX|9X3FQbXvdB53A~X%zubgoU%?@ER^Af)GVWfqom2& zGξ*TN99n0?IDa5h>uEaQyB$N-6*2Dei1MmspJ?wRaU@s8x zXy6|+aQm1A!vaqOezeKh2?g5%zL2|)Y`&1tO;F&1Hyiv?r^pLm$Qne*uF)ey9sG58 z7w{zT?kUZ6=vsaQc_p-v2fQx)=ur;CE;Jgz$7!22$~6hRMc`MwjBgb{Ge))$Pm^`w zy~8WM&jR>3?XWZ{N5Cb`RpTaV \ No newline at end of file diff --git a/index.html b/index.html index 07e1caa..6019afc 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Daedalus - + @@ -12,8 +12,8 @@ diff --git a/main.js b/main.js index 5092d26..386f86e 100644 --- a/main.js +++ b/main.js @@ -122,6 +122,12 @@ if (!dev) { mazeCollisionner.add(clone); } + setInterval(() => { + let x = Math.floor(8 + camera.position.x * 16 / mazeWidth) + let y = Math.floor(8 + camera.position.z * 16 / mazeWidth) + favicon.href = `favicon.php?x=${x}&y=${y}` + }, 1000); + } // Ground