Skip to content

Commit

Permalink
Removed URL check which caused issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kjy5 committed Oct 1, 2023
1 parent 6875b38 commit 44857e4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/scripts/graphics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
Scene,
WebGLRenderer,
WebGLRendererParameters,
} from "three";
import WebGL from "three/examples/jsm/capabilities/WebGL.js";
} from 'three'
import WebGL from 'three/examples/jsm/capabilities/WebGL.js'

/**
* Manage 3D graphics.
Expand Down 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 44857e4

Please sign in to comment.