Skip to content

Commit

Permalink
Fix #834
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Oct 31, 2024
1 parent cb24815 commit 4791c32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion example/src/camera/CameraTransitionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ export class CameraTransitionManager extends EventDispatcher {

const targetNearPlane = MathUtils.lerp( distToPersp + perspectiveCamera.near, distToOrtho + _orthographicCamera.near, alpha );
const targetFarPlane = MathUtils.lerp( distToPersp + perspectiveCamera.far, distToOrtho + _orthographicCamera.far, alpha );
const planeDelta = targetFarPlane - targetNearPlane;
const planeDelta = Math.max( targetFarPlane, 0 ) - Math.max( targetNearPlane, 0 );

// NOTE: The "planeDelta * 1e-5" can wind up being larger than either of the camera near planes, resulting
// in some clipping during the transition phase.

// update the camera state
transitionCamera.aspect = perspectiveCamera.aspect;
Expand Down

0 comments on commit 4791c32

Please sign in to comment.