Open smurp opened 5 years ago
I initially thought this would be incompatible with boxNG but given that boxNG is still drawing the nodes as wee circles (using CANVAS
) the drawing of edges and circular node could, in fact, be done with the GPU. The complexity with a mixture of GPU graph layout and labels in DIVs (ala boxNG) would be with the exfiltration of position data out to the DOM layer. A solution would be needed for this. Presumably a trick would be possible such as an offscreen area where location data were exfiltrated as a packed integer array (in visible node order) encoded as hues.
There is now some example code for rendering force layouts on the GPU. This is not a drop-in replacement for everything needed by current HuViz, but it gives hints on how to implement what we would need.
https://bl.ocks.org/vicapow/7f14a531dec565ca0884
There are many things which would have to be implemented in conjunction with GL shaders to achieve a transition to rendering HuViz on WebGL.
sway
(ie curvature)