From 1e8d7e82c25dfac07a8da554f9a22dbac30a7f0d Mon Sep 17 00:00:00 2001 From: Kenneth Yang <82800265+kjy5@users.noreply.github.com> Date: Sat, 30 Sep 2023 23:37:16 -0700 Subject: [PATCH] Fixed background not working on navigation (#282) Removed URL check which caused issue --- src/scripts/graphics.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/scripts/graphics.ts b/src/scripts/graphics.ts index fd5c669..9d46f73 100644 --- a/src/scripts/graphics.ts +++ b/src/scripts/graphics.ts @@ -76,10 +76,7 @@ export default class Graphics { #createBackground() { // Setup scrolling window.addEventListener("scroll", () => { - const url = window.location.href; - if (url.substring(url.length - 17) === "honors-portfolio/") { - this.#camera.position.y = (-window.scrollY / window.innerHeight) * 7.7; - } + this.#camera.position.y = (-window.scrollY / window.innerHeight) * 7.7; }); // Add lights