Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Add camera controls #1

Closed
rm-code opened this issue Mar 29, 2015 · 0 comments
Closed

Add camera controls #1

rm-code opened this issue Mar 29, 2015 · 0 comments

Comments

@rm-code
Copy link
Owner

rm-code commented Mar 29, 2015

Camera should be controllable via keyboard.

@rm-code rm-code self-assigned this Mar 29, 2015
rm-code added a commit that referenced this issue Mar 30, 2015
The LogReader was changed so it already cuts off the file from the path
instead of returning a concatenated path. It simply reverses the path,
cuts off the file's name and extension and then re-reverses everything.
This should have a positive impact on performance, because paths will
only have to be cut up when new folder nodes need to be placed.

The FileNode, FolderNode and Node classes have been replaced by new
classes in the graph subfolder.

A lot of functionality was cut from the MainScreen and moved to other
classes. Most importantly this includes the creation and modification
of nodes and files. These functions are now handled by a brand new
Graph class.

The Graph class handles the updating and drawing of the whole graph
(nodes, files and edges). It also contains the functions in charge of
transforming git commands into graph related actions such as creating
new nodes, adding and removing files and edges. This is also were the
biggest change in this update comes into play. Before, the graph would
be comprised of nested tables where each subfolder was a table contained
in his parent folder. Now, we store folders on the same level (so to
speak) and use their full paths as keys (instead of just their names).
As a consequence we don't have to recursively search through nested
table after nested table when a file needs to be accessed, but instead
we can directly access its folder node via its path.

Furthermore, the file layout of a node isn't updated on every update
anymore. Instead we just update it, when a file is added or removed.
Files will store the offset from their parent's location, which is
calculated by the layout function. Because of this we will only have to
pass the updated parent location to the files on each update.

The rewritten system shows a huge decrease in memory usage and garbage
production, mainly because I reduced the amount of "throwaway" temporary
tables. I also managed to run a large repository (Blender) for the first
time without producing a crash or having it freeze. It ran at about
25 FPS with a rigid graph.

The graph is now back to a static state since I removed the box2d
remnants and the related movement code. Porting this code into the new
graph layout would have been tedious and not worth the time, granted it
will be rewritten soon anyway. Therefore this closes issue #1.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant