Skip to content

Commit

Permalink
fix: avoid flickering at far distances
Browse files Browse the repository at this point in the history
Decrease frustum depth to avoid flickering at
far distances.
  • Loading branch information
oscarlorentzon committed Oct 16, 2024
1 parent 23349c4 commit 3354395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/RenderCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export class RenderCamera {
this._perspective = new THREE.PerspectiveCamera(
this._initialFov,
this._computeAspect(elementWidth, elementHeight),
1e-3,
1e6);
1e-1,
1e4);
this._perspective.position.copy(this._camera.position);
this._perspective.up.copy(this._camera.up);
this._perspective.lookAt(this._camera.lookat);
Expand Down

0 comments on commit 3354395

Please sign in to comment.