meshcat-dev / meshcat

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

set_property to open/close a folder #169

Open jwnimmer-tri opened 7 months ago

jwnimmer-tri commented 7 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().