mhkeller/layercake

3d graph

Closed this issue · 3 comments

janosh commented

Could layercake be used to visualize a 3d graph of nodes, vertices and surfaces? Might look something like this.

Color-online-a-The-infinite-3d-pyrochlore-lattice-composed-of-up-and-down

LayerCake does the work of measuring a container div, measuring the extent of your data and creating D3 scales and SVG, HTML, Canvas, or WebGL elements to draw your chart in. The library has no built-in "chart types" and the idea is you bring your own renderers. If the DOM measurement and data extent calculations would be helpful to you then yes you can use LayerCake to make this dataviz. Once it has set up your canvas element, though, the library gets out of the way and lets you create whatever you want in that space.

janosh commented

Thanks for the clarification! I should read the docs more carefully. 😅

All good! If you end up using it, drop a link I'd love to see it. Essentially, if you want a canvas element to be responsive in size to some div, Layer Cake will be helpful for that. But it won't be doing any heavy lifting when it comes to what you want to render inside that canvas except give you scales to use. Within the 3d context, though, I'm not sure if D3 scales will be that applicable though. It's been a while since I've done something in 3d.