Skip to content

Commit

Permalink
Fix odd behavior on zooming in
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Oct 25, 2024
1 parent 3f0da05 commit 2933415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/three/controls/EnvironmentControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ export class EnvironmentControls extends EventDispatcher {
} else {

const remainingDistance = Math.max( 0, dist - minDistance );
scale = scale * ( dist - minDistance ) * zoomSpeed * 0.0025;
scale = scale * Math.max( dist - minDistance, 0 ) * zoomSpeed * 0.0025;
scale = Math.min( scale, remainingDistance );

}
Expand Down

0 comments on commit 2933415

Please sign in to comment.