Posts

Showing posts with the label webgl

How to create nodes with a border with the webgl renderer in sigmajs

Image
How to create nodes with a border with the webgl renderer in sigmajs I have a rather large graph so it is necessary to use webgl instead of canvas. I tried to change the webgl node renderer by trying to trick it to draw two circles with the outer one being a little bit bigger, thus creating an border. Unfortunately this didn't work. In the data array the extra code is completely ignored. If someone has an idea it would be appreciated! Below is the code that renders the nodes for the webgl renderer. sigma.webgl.nodes.def = { POINTS: 3, ATTRIBUTES: 5, addNode: function(node, data, i, prefix, settings) { var color = sigma.utils.floatColor( node.color || settings('defaultNodeColor') ); data[i++] = node[prefix + 'x']; data[i++] = node[prefix + 'y']; data[i++] = node[prefix + 'size']; data[i++] = 7864320; data[i++] = 0; data[i++] = node[prefix + 'x']; data[i++] = node[prefix + 'y']; data[i++] = node[prefix + ...