From c07175f4fa0de36d5ad14751972945d2c85e6dc3 Mon Sep 17 00:00:00 2001 From: LJ5O <75009579+LJ5O@users.noreply.github.com> Date: Thu, 18 Jan 2024 01:17:08 +0100 Subject: [PATCH] Added a first zoom plate Works great, let's make the code cleaner and use it everywhere --- index.html | 18 ++++++++++++ src/main.js | 2 +- src/utils/addAssetsOnScene.js | 54 ++++++++++++++++++++++++----------- src/utils/pictureZoom.js | 11 +++++++ src/utils/playerCollisions.js | 6 ++-- 5 files changed, 70 insertions(+), 21 deletions(-) create mode 100644 src/utils/pictureZoom.js diff --git a/index.html b/index.html index 8a5f299..a0b8ef8 100644 --- a/index.html +++ b/index.html @@ -31,6 +31,21 @@ font-size: 1em; font-family: Arial, Helvetica, sans-serif; } + + #picture_zoom{ + position: absolute; + top: 10%; + bottom: 10%; + left: 10%; + right: 10%; + border: 4px solid black; + z-index: 100; + + } + #picture_zoom img{ + width: 100%; + height: 100%; + } @@ -38,6 +53,9 @@