Installation of the package went smoothly, so I think that it’s installed correctly.
I tried running the sinfun example, using include(“sinfun.jl”) while in the repl, for glvisualize and it get the following error:
WARNING: imported binding for scale overwritten in module Main
ERROR: LoadError: MethodError: no method matching view(::GLAbstraction.Context{GLAbstraction.DeviceUnit}, ::GLWindow.Screen)
Strangely when I look for view in the documentation I can’t seem to find it. I then tried the Linesegments3D example and got an error that view does not accept keywords.
Are the examples just out of date ?
Any help appreciated.
Here’s the actual code, which comes from the glvisualize documentation:
window = glscreen()
timesignal = bounce(linspace(0f0,1f0,360))
t = const_lift(*, timesignal, 20pi)
n = 50
const yrange = linspace(0.03, 0.3, n)
trange = linspace(0, 10pi, 200)
function gen_points(timesignal, y)
x = sin(timesignal+(y*60*pi*y)+y)*y*5
z = cos((timesignal+pi)+(y*60*pi*y)+y)*y*5
Point3f0(x,y*60f0,z)
end
function gen_points(timesignal)
Point3f0[gen_points(timesignal, y) for y in yrange]
end
positions = map(gen_points, t)
scale = map(Vec3f0, linspace(0.05, 0.6, n))
primitive = centered(Sphere)
color = map(RGB{Float32}, colormap("RdBu", n))
points = visualize((primitive, positions), scale=scale, color=color)
view(points, window)
renderloop(window)