6 ms·
This is great, do you use anything under the hood? D3/ThreeJS?
by tenaciousDaniel 5y ago
This is great, do you use anything under the hood? D3/ThreeJS?
- stevenpetryk 5y agoSVG. It's remarkably powerful given that it supports arbitrary linear transformations and all sorts of computer graphics things.
- westoncb 5y agoCan anyone give a brief explanation of what it means to use SVG in this context? I think of it as a file format, but I'm assuming no files are involved here. Aside from that I've noticed the contents of SVG files look similar to the 2d canvas operations—which to my mind seems like the natural thing to use for something like this—so why use SVG instead? And is there any relationship between canvas drawing and SVG?
- remram 5y agoJavaScript can write SVG just like it writes HTML. Your React render() can return <svg><rect ... /></svg> as easily as <div><p>...</p></div>
- tenaciousDaniel 5y agoYep, svg + react = declarative graphics. I love it. I used it to replace D3 in a project I worked on last year and no regrets at all.
- stevenpetryk 5y agoSVG works much more naturally with React, since it’s able to be managed via the DOM. Doesn’t have to be an <img />.
- nighthawk454 5y agoglancing at the code, it appears to just be SVG. and pretty cleanly at that
- jimmySixDOF 5y agoI think there is a lot possible with a ThreeJS approach for DataViz. For instance there is a project [1] to have R implemented in A-Frame [2] (a simplified HTML like framework for ThreeJS). 3D in AR/VR is definitely a whole new visual language space for education such as the work by FlowImmersve's TicTok Data Guy [3]. [1] https://github.com/ACEMS/r2vr https://github.com/ACEMS/r2vr [2] https://aframe.io/ https://aframe.io/ [3] https://www.tiktok.com/@the.data.guy https://www.tiktok.com/@the.data.guy