3d-force-graph icon indicating copy to clipboard operation
3d-force-graph copied to clipboard

Can this support 2D ?

Open neo6053 opened this issue 3 years ago • 3 comments

I plan to upgrade our old d3v2 library since the performance is very bad as it's using SVG. I try to use VisJS which uses canvas but still the performance is not that good. I wonder is there a library that uses WebGL for rendering network graph (force directed graph). Then, I stumble across this library, But I do not need the 3D camera view, is it possible to fix the camera to 2D? or is there any better 2D graph library with good performance? I saw vasturiano has this library, but it also uses canvas : https://github.com/vasturiano/force-graph

neo6053 avatar Nov 04 '21 07:11 neo6053

@neo6053 you can set the number of dimensions to 2 in this module via .numDimensions(2). Additionally you can switch to fly controls (see this example) which will switch the navigation to something closer to what you'd expect from a 2D view.

I'm not certain you'll achieve a higher performance compared to canvas rendering, but you can try.

vasturiano avatar Nov 04 '21 12:11 vasturiano

@vasturiano Thank you very much! I find the performance of WebGL is much better than canvas? https://ahoak.github.io/renderer-benchmark/

neo6053 avatar Nov 05 '21 14:11 neo6053

@vasturiano非常感谢! 我发现WebGL的性能比canvas好很多?https://ahoak.github.io/renderer-benchmark/

Can I see your source code

zzr1001 avatar Jan 03 '24 08:01 zzr1001