Skip to content

Commit 4791c32

Browse files
committed
Fix #834
1 parent cb24815 commit 4791c32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/src/camera/CameraTransitionManager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ export class CameraTransitionManager extends EventDispatcher {
285285

286286
const targetNearPlane = MathUtils.lerp( distToPersp + perspectiveCamera.near, distToOrtho + _orthographicCamera.near, alpha );
287287
const targetFarPlane = MathUtils.lerp( distToPersp + perspectiveCamera.far, distToOrtho + _orthographicCamera.far, alpha );
288-
const planeDelta = targetFarPlane - targetNearPlane;
288+
const planeDelta = Math.max( targetFarPlane, 0 ) - Math.max( targetNearPlane, 0 );
289+
290+
// NOTE: The "planeDelta * 1e-5" can wind up being larger than either of the camera near planes, resulting
291+
// in some clipping during the transition phase.
289292

290293
// update the camera state
291294
transitionCamera.aspect = perspectiveCamera.aspect;

0 commit comments

Comments
 (0)