@@ -60,7 +60,7 @@ def __init__(self, position= [0.0,0.0,0.0], scale= [1,1,1], color=[1,1,1],
6060 def _update (self ):
6161 """Serialize and update the data in the Urchin Renderer
6262 """
63- client .sio .emit ('urchin-meshes-update' , self .data .to_string ())
63+ client .sio .emit ('urchin-meshes-update' , self .data .to_json_string ())
6464
6565 def delete (self ):
6666 """Deletes meshes
@@ -77,7 +77,7 @@ def delete(self):
7777 data = IDData
7878 data .id = self .data .id
7979
80- client .sio .emit ('urchin-meshes-delete' , data .to_string ())
80+ client .sio .emit ('urchin-meshes-delete' , data .to_json_string ())
8181 self .in_unity = False
8282
8383 def set_position (self , position ):
@@ -220,7 +220,7 @@ def delete(meshes_list):
220220 ids = [x .data .id for x in meshes_list ]
221221 )
222222
223- client .sio .emit ('urchin-meshes-deletes' , data .to_string ())
223+ client .sio .emit ('urchin-meshes-deletes' , data .to_json_string ())
224224
225225def set_positions (meshes_list , positions_list ):
226226 """Set the positions of mesh renderers
@@ -244,7 +244,7 @@ def set_positions(meshes_list, positions_list):
244244 values = [utils .formatted_vector3 (utils .sanitize_vector3 ([x [0 ]/ 1000 , x [1 ]/ 1000 , x [2 ]/ 1000 ])) for x in positions_list ]
245245 )
246246
247- client .sio .emit ('urchin-meshes-positions' , data .to_string ())
247+ client .sio .emit ('urchin-meshes-positions' , data .to_json_string ())
248248
249249def set_scales (meshes_list , scales_list ):
250250 """Set scale of mesh renderers
@@ -268,7 +268,7 @@ def set_scales(meshes_list, scales_list):
268268 values = [utils .formatted_vector3 (utils .sanitize_vector3 (x )) for x in scales_list ]
269269 )
270270
271- client .sio .emit ('urchin-meshes-scales' , data .to_string ())
271+ client .sio .emit ('urchin-meshes-scales' , data .to_json_string ())
272272
273273def set_colors (meshes_list , colors_list ):
274274 """Sets colors of mesh renderers
@@ -293,7 +293,7 @@ def set_colors(meshes_list, colors_list):
293293 values = [utils .formatted_color (x ) for x in colors_list ]
294294 )
295295
296- client .sio .emit ('urchin-meshes-colors' , data .to_string ())
296+ client .sio .emit ('urchin-meshes-colors' , data .to_json_string ())
297297
298298def set_materials (meshes_list , materials_list ):
299299 """Sets materials of mesh renderers
@@ -318,4 +318,4 @@ def set_materials(meshes_list, materials_list):
318318 values = [utils .sanitize_material (x ) for x in materials_list ]
319319 )
320320
321- client .sio .emit ('urchin-meshes-materials' , data .to_string ())
321+ client .sio .emit ('urchin-meshes-materials' , data .to_json_string ())
0 commit comments