glue-viz / glue-ar

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Add support for ipyvolume scatter viewer #48

Closed Carifio24 closed 3 weeks ago

Carifio24 commented 3 weeks ago

This PR enables support for glue-jupyter's ipyvolume scatter viewer. This involved a bit of refactoring to make the scatter export methods flexible in order to support both viewer types. Currently the ipyvolume scatter export options class doesn't have any fields - the sphere geometry in ipyvolume has particular resolutions in both theta and phi, so we go with that. The same is true for the diamond geometry (it's actually just a very low-res sphere), and the box doesn't really have any options.

I couldn't get the circle2d geometry to work (it doesn't show anything for me in the viewer), but for that case we use spheres, just like vispy does.