Meshcat - change scene properties

Hi everyone,

I’m using Meshcat with Blink and WebIO.
How can I change its default properties concerning:

  • Background color,
  • Grid on/off,
  • Visualizer size & position in Blink window

Thanks in advance

Yeah, I’m definitely lacking some documentation for this sort of thing. Here’s an example of changing the background color (using colorant from Colors.jl):

You can turn off the grid by doing:

setprop!(vis["/Grid"], "visible", false)

In both cases, the path to the object in question (the grid or background) is the same as its name in the Scene tab in the upper-left corner.

Unfortunately this isn’t really something MeshCat can do on its own, but it should be possible to create a set of WebIO nodes, one of which holds your visualizer. There’s an example of that here: https://github.com/JuliaRobotics/RigidBodySim.jl/blob/0f3153d4ae7964f0261c0097351695c200df82c5/src/visualization.jl#L193-L198

The basic idea is that you can do WebIO.iframe(vis.core) to create a WebIO node holding your visualizer, and you can nest that in other WebIO nodes however you like.

Thanks for your help!
I managed to solve all problems except the visualizer size :frowning: