meshcat-dev / meshcat

Remotely-controllable 3D viewer, built on top of three.js
MIT License
256 stars 48 forks source link

set_property to open/close a folder #169

Open jwnimmer-tri opened 9 months ago

jwnimmer-tri commented 9 months ago

In the context of https://github.com/RobotLocomotion/drake/pull/20797, it would be helpful to allow programmatic remote control over the folder state.

One way to offer that would be a property message:

{
  "type": "set_property",
  "path": "/drake",
  "property": "folder_open",
  "value": true
}

When the value is true we'd call folder.open(), for false we'd call folder.close().