glotzerlab / plato

Efficient visualization of particle data supporting several rendering engines.
https://plato-draw.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Add Zdog backend #36

Closed klarh closed 5 years ago

klarh commented 5 years ago

This backend uses zdog to create visualizations in HTML canvas or svg elements. Since the color of shapes is baked in at render-time, while you can rotate the shapes, the lights will essentially rotate along with them (in contrast to other interactive plato backends, where the lights are fixed and the scene is rotating independently).

Things to do before this is roughly complete:

We should also consider adding at least a basic set of 2D primitives, since they very naturally map to the vector graphics rendering that zdog is actually using. As far as I know zdog doesn't support interactive dragging with the mouse, but it should be straightforward to add that as JS as well.

klarh commented 5 years ago

Manually merged.