Skip to content

Commit

Permalink
Fixed background not working on navigation (#282)
Browse files Browse the repository at this point in the history
Removed URL check which caused issue
  • Loading branch information
kjy5 authored Oct 1, 2023
1 parent 6875b38 commit 1e8d7e8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/scripts/graphics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e8d7e8

Please sign in to comment.