Skip to content

Commit

Permalink
Utilize new meshcat interface for transparency
Browse files Browse the repository at this point in the history
gizatt committed Feb 27, 2019
1 parent e0de1f6 commit 387800a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bindings/pydrake/systems/meshcat_visualizer.py
Original file line number Diff line number Diff line change
@@ -101,7 +101,9 @@ def rgb_2_hex(rgb):
val += (256**(2 - i)) * int(255 * rgb[i])
return val
material = meshcat.geometry.MeshLambertMaterial(
color=rgb_2_hex(geom.color))
color=rgb_2_hex(geom.color[:3]),
transparent=geom.color[3] != 1.,
opacity=geom.color[3])
return meshcat_geom, material, element_local_tf


0 comments on commit 387800a

Please sign in to comment.