Yeah, I know what you mean I guess it doesn't really have any other point than data visualisation and looking nice.Ref wrote:Conclusion: Very interesting but really don't know what to do with it.
Thank you (and yeah I should really remove the semi-colons at some point)Ref wrote:Really surprised as to how easy it was to add rotation (just press 'R')
Really a neat script.
Good job.
Camera rotation and all the other stuff is why I decided against adding a custom drawing function. In LoGiVi I just use the callbacks:
Code: Select all
graph:draw( function( node )
if showLabels then
local x, y = node:getPosition();
local radius = node:getRadius();
love.graphics.setFont( LABEL_FONT );
love.graphics.print( node:getName(), x, y, -camrot, 1 / camscale, 1 / camscale, -radius * camscale, -radius * camscale );
love.graphics.setFont( DEFAULT_FONT );
end
end,
function( edge )
love.graphics.setColor( EDGE_COLOR );
love.graphics.setLineWidth( edgeWidth );
love.graphics.line( edge.origin:getX(), edge.origin:getY(), edge.target:getX(), edge.target:getY() );
love.graphics.setLineWidth( 1 );
love.graphics.setColor( 255, 255, 255, 255 );
end);