File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def __init__(
4141 * ,
4242 host : str = "0.0.0.0" ,
4343 port : int = 8080 ,
44+ label : str | None = None ,
4445 show_gui : bool = True ,
4546 show_sim_controls : bool | None = None ,
4647 show_visibility : bool | None = None ,
@@ -49,6 +50,7 @@ def __init__(
4950 self ._data = data
5051 self ._host = host
5152 self ._port = port
53+ self ._label = label
5254 self ._show_gui = show_gui
5355 # None = inherit from show_gui
5456 self ._show_sim_controls = show_sim_controls if show_sim_controls is not None else show_gui
@@ -58,6 +60,8 @@ def __init__(
5860 self ._panels : list [PanelBase ] = []
5961
6062 self ._server = viser .ViserServer (host = host , port = port )
63+ if label is not None :
64+ self ._server .run_javascript (f"document.title = { label !r} ;" )
6165 self ._scene_mgr = SceneManager (self ._server , model , data )
6266 self ._gui_mgr : GuiManager | None = None
6367 self ._huds : dict [str , viser .GuiHtmlHandle ] = {}
You can’t perform that action at this time.
0 commit comments