How to display moving objects in Makie.jl

Maybe like this: KiteViewers.jl/src/common.jl at d97b75285136a9e77b3d354a84ca53c3234bb0cc · aenarete/KiteViewers.jl · GitHub

I updated KiteViewers.jl to the latest version of Makie.jl and heavily move objects around.

Ok, the type definitions are also important:

    points::Vector{Point{3, Float32}}
    positions::Observable{Vector{GeometryBasics.Point{3, Float32}}}

I first calculate the vector of the positions, and then assign them to a vector of observables.

    # move, scale and turn the cylinder correctly
    kv.positions[]   = calc_positions(kv.set.segments)
    kv.markersizes[] = calc_markersizes(kv.set.segments)
    kv.rotations[]   = calc_rotations(kv.set.segments)
1 Like