I realized that Iāll need the same thing soon, so I gave it a shot, but failed. I assumed that the following code should work:
using Meshes, MeshViz
import GLMakie as Mke
basepose = Mke.Observable(Point3(0.,0,0))
plane1 = Mke.@lift Plane($basepose, Vec3(0,0,1))
plane2 = Mke.@lift Plane($basepose + Vec3(0,0,10), Vec3(0,0,1))
cylinder = Mke.@lift Cylinder(5.0, $plane1, $plane2)
viz(cylinder)
# wait for Makie window to appear
basepose[] = Point3(-10.0, -10, -10)
then I though maybe I canāt update the points of a geometry, so I tried to change a transformation by adding observables to a docs example, but that didnāt work either:
grid = CartesianGrid(10, 10)
trsl = Mke.Observable(Translate(10., 20.))
mesh = Mke.@lift grid |> $trsl
fig = Mke.Figure(resolution = (800, 400))
viz(fig[1,1], grid)
viz(fig[1,2], mesh)
fig
# wait for Makie window to appear
trsl[] = Translate(-10., -20.,)
with Julia v1.8.5 and versions:
[e9467ef8] GLMakie v0.8.4
[9ecf9c4f] MeshViz v0.7.5
[eacbb407] Meshes v0.28.1
What am I missing here?
Edit: by failing I mean: when I ran the lines, that update the observables, nothing changed in the makie window.