Skip to content

Commit

Permalink
Make camera configurable, remove view distance limit
Browse files Browse the repository at this point in the history
  • Loading branch information
surrsurus committed May 29, 2024
1 parent 0fb0570 commit 81ed7bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export class Light extends Drawable {
}

export class CameraRig {
constructor() {
constructor(fov = 70, boomLength = 0.15) {
// sets how long the camera boom is. the camera will be allowed to go below this, but won't go above it
this.boomLength = 0.15;
this.boomLength = boomLength;

this.camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 10);
this.camera = new THREE.PerspectiveCamera(fov, window.innerWidth / window.innerHeight, 0.01);
this.camera.position.set(0, 0.3, -1);
this.camera.lookAt(scene.position);

Expand Down

0 comments on commit 81ed7bf

Please sign in to comment.