Add optional arguments "center" and "radius" to webgui.Draw()

This commit is contained in:
Matthias Hochsteger 2024-06-15 16:35:23 +02:00
parent c488fa936a
commit 919000a5ef

View File

@ -333,6 +333,15 @@ class WebGLScene(base):
else:
d["objects"].append(obj._GetWebguiData())
if 'center' in kwargs:
center = list(kwargs['center'])
if len(center) == 2:
center.append(0.)
d["mesh_center"] = center
if 'radius' in kwargs:
d["mesh_radius"] = kwargs['radius']
return d