From ed6709cfe8590cf3ed4997f182d445e1fee740ea Mon Sep 17 00:00:00 2001 From: Oscar Lorentzon Date: Wed, 16 Oct 2024 11:21:21 -0700 Subject: [PATCH] fix: avoid flickering at far distances Decrease frustum depth to avoid flickering at far distances. --- src/render/RenderCamera.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/RenderCamera.ts b/src/render/RenderCamera.ts index 17830c5f..32802296 100644 --- a/src/render/RenderCamera.ts +++ b/src/render/RenderCamera.ts @@ -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);