diff --git a/NEWS.md b/NEWS.md index 087cbf5309b..194110c3049 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,8 +2,9 @@ ## master -- Fixed a bug with h/vlines and h/vspan not correctly resolving transformations [#3418](https://github.com/MakieOrg/Makie.jl/pull/3418) -- Fixed a bug with h/vlines and h/vspan returning the wrong limits, causing an error in Axis [#3427](https://github.com/MakieOrg/Makie.jl/pull/3427) +- Fixed a bug with h/vlines and h/vspan not correctly resolving transformations [#3418](https://github.com/MakieOrg/Makie.jl/pull/3418). +- Fixed a bug with h/vlines and h/vspan returning the wrong limits, causing an error in Axis [#3427](https://github.com/MakieOrg/Makie.jl/pull/3427). +- Fixed clipping when zooming out of a 3D (L)Scene [#3433](https://github.com/MakieOrg/Makie.jl/pull/3433). ## 0.20.1 diff --git a/src/camera/camera3d.jl b/src/camera/camera3d.jl index dc789edadaf..63305b92566 100644 --- a/src/camera/camera3d.jl +++ b/src/camera/camera3d.jl @@ -728,7 +728,7 @@ function update_cam!(scene::Scene, cam::Camera3D) far = far_dist * far elseif cam.settings.clipping_mode[] === :adaptive view_dist = norm(eyeposition - lookat) - near = view_dist * near; far = far + near = view_dist * near; far = max(1f0, view_dist) * far elseif cam.settings.clipping_mode[] !== :static @error "clipping_mode = $(cam.settings.clipping_mode[]) not recognized, using :static." end @@ -775,7 +775,7 @@ function update_cam!(scene::Scene, cam::Camera3D, area3d::Rect, recenter::Bool = cam.far[] = 2f0 * dist elseif cam.settings.clipping_mode[] === :adaptive cam.near[] = 0.1f0 * dist / norm(cam.eyeposition[] - cam.lookat[]) - cam.far[] = 2f0 * dist + cam.far[] = 2.2f0 * dist / norm(cam.eyeposition[] - cam.lookat[]) end update_cam!(scene, cam)