GLMakie: Create 3D animations with GLMakie?

Here’s an example how to do a meshscatter barplot animation

using GLMakie

sz = (20, 20)
t = Observable(0.0)
sizes = lift(t) do t
    [Vec3f(1, 1, 1 + sin(x/3 + t) * cos(y/3 + t)) for x in 1:sz[1] for y in 1:sz[2]]
end
positions = [(x, y) for x in 1:sz[1] for y in 1:sz[2]]
f, ax, ms = meshscatter(positions, markersize = sizes, marker = Rect3f((-0.5, -0.5, 0), (1, 1, 1)); axis = (; type = Axis3))

record(f, "meshscatter.mp4", 0:1/30:5) do _t
    t[] = _t
end

2 Likes