Interactive use of Makie

I am trying to use Makie interactively. This means, make a plot, change some values in the repl, make a new plot. The new plot shall only be added to the screen. This doesn’t work for me yet.

Precondition: Add my tiny test package:

]
add https://github.com/ufechner7/KiteViewer.jl

Then type:

using KiteViewer
rects()
show3d()

This displays three rectangles.
If you type now:

spheres()

The scale of the coordinate system changes, but no sphere is displayed.
If you now type

show3d()

The sphere is now displayed, but the complete window is closed and redisplayed.

The code:

function spheres()
    mesh!(Sphere(Point3f0(0), 0.5f0), color = :blue)
    nothing
end

show3d()=display(Makie.Screen(), scene)

How can I achieve the goal that with the function spheres() the sphere is displayed without redrawing the everything?

Additional question:

I would already be glad if I could move a 3D object like a sphere without redrawing the rest of the scene.

2 Likes