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:
[x] Find another way to make sure JS loading after the zdog JS (currently using require.js, which is bundled into jupyter notebook, but it would be nice to not have to have require.js loaded)
[x] Utilize Scene translation/rotation values
[x] Add Spheres (same trick we use for matplotlib: render a series of circles based on the light level?)
[x] Add ConvexSpheropolyhedra (same as ConvexPolyhedra, but add a stroke width for each face corresponding to the rounding radius)
[x] Add Lines
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.
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.