Thanks for the tip!
I adapted your idea to my code and was able to fix the syntax errors. This is how far I got:
function Viewer3D()
# old code, working with GLMakie 4.7
# scene, layout = layoutscene(resolution = (840, 900), backgroundcolor = RGBf0(0.7, 0.8, 1))
# scene3D = LScene(scene, scenekw = (show_axis=false, limits = Rect(-7,-10.0,0, 11,10,11), resolution = (800, 800)), raw=false)
fig = Figure(resolution=(840, 900), backgroundcolor=RGBf(0.7, 0.8, 1))
# just a try
scene = fig[1,1]
scene3D = LScene(scene, scenekw=(show_axis=false, limits=Rect(-7,-10.0,0, 11,10,11), resolution=(800, 800)), raw=false)
create_coordinate_system(scene3D)
cam = cameracontrols(scene3D.scene)
FLYING[1] = false
PLAYING[1] = false
GUI_ACTIVE[1] = true
reset_view(cam, scene3D)
textsize[] = TEXT_SIZE
textsize2[] = AXIS_LABEL_SIZE
text!(scene3D, "z", position = Point3f0(0, 0, 14.6), textsize = textsize2, align = (:center, :center), show_axis = false)
text!(scene3D, "x", position = Point3f0(17, 0,0), textsize = textsize2, align = (:center, :center), show_axis = false)
text!(scene3D, "y", position = Point3f0( 0, 14.5, 0), textsize = textsize2, align = (:center, :center), show_axis = false)
text!(scene, status, position = Point2f0( 20, 0), textsize = TEXT_SIZE, align = (:left, :bottom), show_axis = false)
status[]="Stopped"
# layout[1, 1] = scene3D
# layout[2, 1] = buttongrid = GridLayout(tellwidth = false)
# l_sublayout = GridLayout()
# layout[1:3, 1] = l_sublayout
# l_sublayout[:v] = [scene3D, buttongrid]
btn_RESET = Button(scene, label = "RESET")
btn_ZOOM_in = Button(scene, label = "Zoom +")
btn_ZOOM_out = Button(scene, label = "Zoom -")
btn_PLAY_PAUSE = Button(scene, label = @lift($running ? "PAUSE" : " PLAY "))
btn_STOP = Button(scene, label = "STOP")
sw = Toggle(scene, active = false)
label = Label(scene, "repeat")
# buttongrid[1, 1:7] = [btn_PLAY_PAUSE, btn_ZOOM_in, btn_ZOOM_out, btn_RESET, btn_STOP, sw, label]
gl_screen = display(scene)
# old code, working with GLMakie 4.7
# Viewer3D(scene, layout, scene3D, cam, gl_screen, btn_RESET, btn_ZOOM_in, btn_ZOOM_out)
Viewer3D(scene3D, cam, btn_RESET, btn_ZOOM_in, btn_ZOOM_out)
end
But if I run:
using KiteViewers
viewer=Viewer3D()
nothing happens, I mean no Window pops up as it did when using GLMakie 0.4.7.
What am I doing wrong?
You can find my full code at GitHub - aenarete/KiteViewers.jl at newmakie, the file to look at is the file “pure.jl”.