Repository navigation
Proposal: Allow Passing an Existing ViserServer Handle to ViserPlayViewer
#691
Closed
CumulusAlpha
started this conversation in
Ideas
Replies: 3 comments
|
I implemented this last night, very very useful. Will have a PR out soon! Thanks @CumulusAlpha! |
0 replies
|
Feature has been merged, thanks @CumulusAlpha. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal: Allow Passing an Existing
ViserServerHandle toViserPlayViewerHi all 👋
I’m currently using
ViserPlayViewertogether with other custom visualization components based onviser. I ran into a small issue regarding howViserServerinstances are created.Current Behavior
At the moment,
ViserPlayViewerinternally creates its ownViserServerinstance insidesetup(). This means:ViserServerrunningFor more complex setups (e.g. custom slider bar controls and so on), this is inconvenient and makes UI composition harder.
Proposed Change
Allow users to optionally pass in an existing
ViserServerinstance.If none is provided, the viewer creates its own (current behavior preserved).
And we remove:
# self._server = viser.ViserServer(label="mjlab")from
setup().Example Implementation
Why This Helps
This small change enables:
Backward Compatibility
This change is fully backward-compatible:
Question
Would the maintainers be open to this change?
If this direction sounds reasonable, I’d be happy to open a PR to implement it. Alternatively, if you prefer to make the modification yourselves, that works perfectly fine as well.
Thanks for your time and consideration!
All reactions