Skip to content

Commit

Permalink
adds lscene limits example
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarusA committed Aug 5, 2024
1 parent e446e58 commit bc9c1f7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ const viteConfig = defineViteConfig({
{ text: 'RRGraph3D',link: '/examples/3d/mscatters/RRGraph3D' },
{ text: 'SSAO_meshscatter',link: '/examples/3d/mscatters/SSAO_meshscatter' },
{ text: 'SSAO_mgrid',link: '/examples/3d/mscatters/SSAO_mgrid' },
{ text: 'LScene limits',link: '/examples/3d/mscatters/lscene_limits' },
],
},
{
Expand Down
18 changes: 18 additions & 0 deletions examples/3d/mscatters/lscene_limits.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ## Sets limits on a LScene

# ![](lscene_limits.png)

using GLMakie
using Random
Random.seed!(1618)
GLMakie.activate!()

fig = Figure()
ax = LScene(fig[1, 1], scenekw = (;
limits=Rect3f(Vec3f(0,0,0),Vec3f(1.5, 1.5, 2.5)))
)
meshscatter!(ax, rand(Point3f, 10); color = :orangered)
meshscatter!(ax, rand(Point3f, 10) .+ Point3f(0,0,1);
color = :grey25, marker=Rect3f(Vec3f(-0.5), Vec3f(1)))
fig
save("lscene_limits.png", fig); # hide

0 comments on commit bc9c1f7

Please sign in to comment.