Open gg4u opened 7 years ago
You can use WebGL like so:
let graph = Viva.Graph.graph();
let webglGraphics = Viva.Graph.View.webglGraphics();
let renderer = Viva.Graph.View.renderer(graph, {
container: document.querySelector('#graph-ctn'),
graphics: webglGraphics,
});
It's waaaay faster than SVG.
Would you tell about pros/cons you see between canvas and webgl ?
How to improve webgl rendering ? In vivagraph I see that webgl doubles rendering of edges and nodes when zooming the graph.
I see some nice examples with pixi.js and three.js + ngraph. Is webgl rendering in vivagraph different from renderer in ngraph + pixi ? If so, I would really find useful a little tutorial showing how to build vivagraph with custom rendering engine and some examples to customise nodes and edges looking with images.
Hi @anvaka , I found SVG implementation very handy, however, did you considered to support also rendering of graph on html5
I thought that for expanded-on-demand graphs it would be a really good approach, for drawing only visibile elements on the canvas, instead of progressively adding new elements on the DOM.
Basically, I see graphs as a google maps, so that you can zoom on more details only on the portion you are interested in - perfect for exploring hair-balls.
Or do you have any particular reason for which you choose not to support
Possible to use the layout part to compute position of elements, and a new module for rendering of elements that check which are in the viewports and does the rendering ?