WorldWideTelescope / wwt-web-client

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

Efficient way to add many annotations in web client #105

Closed astrofrog closed 5 years ago

astrofrog commented 8 years ago

I am interested in adding e.g. 10,000 markers from a catalog to WWT in the web client. However, if I use wwt.addAnnotation, the client becomes extremely slow. Is there a more efficient way to load datasets such as this?

astrojonathan commented 8 years ago

The current WebClient is using a HTML5 canvas to render and doing 3d transforms on that many objects is expensive. We are working on a WebGL port of the web client right now, one done you should be able to do over 100k with no issue. The code is working right now and we see huge performance gains and great frame rates, but we are also porting Tour Authoring and layer display as well and will post a updated version of the web client once all of those are build and tested.

astrofrog commented 7 years ago

@astrojonathan - just to follow up on this, you mention 3d transforms, so I was wondering whether there is a way to avoid doing 3d transforms and just work with the '2d' sky?

astrofrog commented 7 years ago

@astrojonathan - with the WebGL version now available for preview (looks great!) is there an easy way to use the WebGL version instead of the plain HTML5 version? For instance I have an HTML page with:

    <title>Simple WWT Web Client</title>
    <script src="http://www.worldwidetelescope.org/scripts/wwtsdk.aspx"></script>
    <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>

How can I change this to use the WebGL version? Does that version have a compatible JS API?

Note that even if the WebGL version can show 100k points with no issue, I think I would need a more efficient way to plot these than one by one. Is there a planned JS API for plotting larger catalogs of points? (without having to save the catalog to disk).

astrojonathan commented 5 years ago

The new Data Layers functionality addresses this