LoGiVi (git visualisation software)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: LoGiVi (git visualisation software)

Post by zorg »

rmcode wrote:- Check if one of the sides is (noticeably) longer than the other -> If it is the graph should be turned by 90 degrees
Then you'd have the other side be longer, i'm not seeing the use for such a transformation.

Why not just do this?:
- Calculate the rectangle around your graph by going through all objects, and recording the global minimum and maximum x and y coordinates.
- Calculate the scaling needed with rectangleWidth/screenWidth and rectangleHeight/screenHeight
- Select the smaller one (so that for most resolutions (screen sizes that aren't 1:1 ratio) we don't crop, nor do we stretch non-proportionately)
- Do restrict the zoom so it doesn't blow up for 0-1 elements though. (something like math.min(1.0,the_above) would probably do the trick)

Other than this, maybe you should actually store the scale values per-step/per-commit, and smoothly interpolate between the scaling when drawing; like a simple linear interpolation or somethin when going through all the states of a repo, or a bounce for selecting one commit... if you can even do that, i don't know since i didn't have a chance to try this out yet.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

Had some time to implement a basic auto-zoom:

Image

The "flickering" is happening because it currently is constantly switching between zooming in and out when the right scale is almost reached. Rotation is not taken into account (yet).
zorg wrote:Other than this, maybe you should actually store the scale values per-step/per-commit, and smoothly interpolate between the scaling when drawing; like a simple linear interpolation or somethin when going through all the states of a repo, or a bounce for selecting one commit... if you can even do that, i don't know since i didn't have a chance to try this out yet.
Not sure if I understand this correctly, but do you mean I should pre-generate the camera zoom? I don't think that's possible, since the graph is constantly changing and the alignment of the nodes is more or less random. This is especially true when the user fast forwards to a certain commit.
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: LoGiVi (git visualisation software)

Post by zorg »

Yes, i was thinking about pre-generating it; but if it works like that, then you could have a "target" scale variable, that always gets updated to be calculated from the current enclosing rectangle dimensions, a "previous" scale variable that gets the value of whatever was in the target one, before you calculate the next into that, and have a "current" scale variable you use to interpolate between the previous and target variables. This should smooth it out.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
raingloom
Prole
Posts: 36
Joined: Wed Apr 22, 2015 12:35 am
Location: Always elsewhere

Re: LoGiVi (git visualisation software)

Post by raingloom »

It's nice but there are two problems for me:
-no mouse pan/zoom
-negative resize when the cursor goes off screen causes an error, this is OK to catch on the low level, but should be guarded on the input level

Other than that, it's pretty damn awesome
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

raingloom wrote:It's nice but there are two problems for me:
-no mouse pan/zoom
-negative resize when the cursor goes off screen causes an error, this is OK to catch on the low level, but should be guarded on the input level

Other than that, it's pretty damn awesome
Thanks for the feedback! I really appreciate it :)

Added mouse controls for the camera to my TODO list.

I don't understand your second point though. What's the error? Does it crash?
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

I still have some problems with the automatic camera zoom. It stops working correctly at a certain zoom factor.

But I added some more eye-candy to the graph generation in the upcoming version. Deleted files are fading out before they are removed and the rearrangement of files around their nodes is animated.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

Code: Select all

# Version 0404 - 2015/11/24

### Additions
- Added option to add a repository by dropping its folder onto LoGiVi (Closes #46)
- Added automatic camera zoom (Closes #47)
- Added fading of deleted files. They will no longer be removed instantly, but instead fade out until they are invisible (Closes #49)
- Added animation of files when they are rearranged around their parent nodes

### Fixes
- Fixed #44 - File paths are validated after the config has been validated
- Fixed direction of camera rotation
Image
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

Released Version 0432:

I tested it with some of the larger repositories (e.g. the LÖVE source) and graphs seem to be stable now. In previous versions larger chunks of the graph slowly started to drift away from each other.

Code: Select all

# Version 0432 - 2015/12/14

### Additions
- Added scaling for folder and name labels based on the camera's zoom factor
- Added MessageBox which displays a warning in case git isn't found on the user's system (Closes #50)
- Added mouse panning and scaling (Closes #45)
	- The mouse can be used to drag around the camera while the left button is pressed
	- The mouse wheel can be used to zoom in and out

### Fixes
- Fixed #51 - Fixed crash caused by faulty variable
- Fixed #48 - Got rid of the timer for color fading
- Fixed #35 - Made large graphs more stable
- Fixed minor issue with folder labels being drawn multiple times per frame

### Other Changes
- LoGiVi now starts in windowed mode on first start
- Canged design of the file panel to be less intrusive
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: LoGiVi (git visualisation software)

Post by Rucikir »

What do you use to query git commands ? Do you call it from the path with os.execute() or io.popen() ? I think there are portability problems for the last one. Or have you used luagit2 binding of libgit2 ? This one is a bit old, but it seems that the binding can be regenerated and updated. Or... have you written your own, pure lua git implementation ?

I'd like to access the list of tracked and ignored files for my tool love-release (in lua), and as your program makes extensive use of git I was wondering how you've done it.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: LoGiVi (git visualisation software)

Post by rmcode »

Rucikir wrote:I'd like to access the list of tracked and ignored files for my tool love-release (in lua), and as your program makes extensive use of git I was wondering how you've done it.
I wrote the whole git interaction thingy myself. It might be a bit hacky but last time I checked, it worked as expected on both OSX and Windows. I use popen ... I used os.execute at first, but had problems with strange console output.

Hope that helps :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests