Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding Vpython7 in a web page #217

Open
danx0r opened this issue Aug 11, 2022 · 0 comments
Open

Embedding Vpython7 in a web page #217

danx0r opened this issue Aug 11, 2022 · 0 comments

Comments

@danx0r
Copy link
Contributor

danx0r commented Aug 11, 2022

Hi -- New to VPython, in many ways it is my dream platform. The Jupyter integration is awesome, but I want to utilize the browser capabilities to embed VPython in a page. Note that I do not want to transpile into glowscript; I want to run a standard Python server and allow users to connect and have an interactive 3D experience.

I see that it is architected as a client-server app using websockets, running standard Python and opening a web browser on a random port on localhost. It seems to me there should be an easy way to run the server headless so to speak, and have it respond to http requests from a browser over a fixed port -- but I can't find any documentation or examples of this approach.

As a dirty POC, I hacked no_notebook.py to use a hard-coded port, and commented out the code that launches a browser. (This is a better dev experience already as the browser launch code does not play nicely with Ubuntu/gnome's multiple workspaces, but I digress...)

It seems a small step from here to serving on say port 5123, and wrapping nginx TLS around it so the browser can hit https://mysite and Bob's your uncle...

So -- I guess this is a feature request? I could probably pull together a PR on this - unless there is some obvious way to do it on the platform as it exists, but I get the feeling there has been more focus on the notebook implementation.

Any leads or suggestions greatly appreciated. And Thank You for contributing to the Open Source community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant