WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
104 stars 35 forks source link

Is there a way I can control this in the web client via pywwt? #365

Open zfy1041264242 opened 6 months ago

zfy1041264242 commented 6 months ago

I want to build a web side but his actual operation is controlled by pywwt

pkgw commented 6 months ago

Hi,

We don't have tools to support that right now. Pywwt can control one of (1) an instance of WWT in Jupyter, (2) a WWT Qt widget, or (3) a running Windows app.

The "WWT in Jupyter" instance is a web application, so, depending on your needs, you could build a web application based on Jupyter with scripting built using pywwt. This is very roughly the approach taken by the Cosmic Data Stories project.

In principle, a web server running Python code (Tornado, Django, etc.) could have a special pywwt mode that exchanged messages with a web frontend to control a WWT instance from the server side. I believe this is more or less what you're hoping to do; it's at least been requested before. I believe that this would be possible to implement, and possibly even not that difficult for someone with the right expertise. But it would certainly require a fair amount of new code to be written.