meshcat-dev / meshcat

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

Allow to set properties recursively #135

Closed petrikvladimir closed 1 year ago

petrikvladimir commented 1 year ago

This change allows modification of properties of the member instances of the object. For example, it allows to set the green channel of the color through python code: vis['obj1']['<object>'].set_property('material.color.g', 1) The string is unwrapped into: this.object['material']['color']['g'] = 1

It also allows animating color transitions with (again from python):

frame1['obj1']['<object>'].set_property('material.color', 'vector', [1, 0, 0])
frame2['obj1']['<object>'].set_property('material.color', 'vector', [0, 1, 0])