meshcat-dev / meshcat

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

set_control / set control_value : how to use callbacks #114

Open bbdb68 opened 2 years ago

bbdb68 commented 2 years ago

Hello, I am using meshcat from c++ and this is really a nice tool.

I try to use the set_control and set_control_value api, but I have an issue with callbacks : the callback (only console.log('test value='+value); at the monent is called when set_control is issued, but not when I call set_control_value (BTW the value is correctly set), and also is it not called when I move the slider as a user.

Am I missing something ? thanks

(of course the next step would be to send back a message to the calling C++ code when a slider is modified)

RussTedrake commented 1 year ago

Both of those should work; they are covered by the following test https://github.com/rdeits/meshcat/blob/master/test/controls.html#L46 (which I've just verified works fine on master).

Do you have a reproduction?