Skip to content

Commit 30c2ead

Browse files
Make camera distance explicit
1 parent b670f9c commit 30c2ead

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/QuantumToolboxMakieExt.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,9 @@ function _setup_bloch_plot!(b::Bloch, location)
382382
length(b.view) == 2 || throw(ArgumentError("The length of `Bloch.view` must be 2."))
383383
cam3d!(lscene.scene, center = false)
384384
cam = cameracontrols(lscene)
385-
cam.fov[] = 12
386-
update_cam!(lscene.scene, cam, deg2rad(b.view[1]), deg2rad(b.view[2]), 12)
385+
cam.fov[] = 12 # Set field of view to 12 degrees
386+
dist = 12 # Set distance from the camera to the Bloch sphere
387+
update_cam!(lscene.scene, cam, deg2rad(b.view[1]), deg2rad(b.view[2]), dist)
387388
return fig, lscene
388389
end
389390

0 commit comments

Comments
 (0)