Skip to content

alphapua/Force-Directed-Graph-Unity-Neo4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Force-Directed-Graph-Unity-Neo4j

Demo Video on Youtube:
IMAGE ALT TEXT HERE

Testing:

  1. Install Neo4j Desktop
  2. Open Unity (ForceDirectedGraphUnity)
  3. check server setting variables in ServerConnector on Graph Object (neo4j ip,user,pwd...etc)
  4. hit RUN!

Structure:

NeoUnity(VS Folder) : defination of Neo4j data class such like Nodes and Relationships

  • Server.cs : connect to Neo4j server and put data value in Node and Relationship class

it produced NeoUnity.dll for unity project below.

ForceDirectedGraph(Unity Folder) : Render force directed graph by neo4j movie data

Frontend(On Graph Object in Scene):

  • ServerConnector.cs: setup data entity(movie and person) , server settings.
  • GraphRenderer.cs : setup UI , Graph settings(relationship line color) , Camera. new Graph and GraphScene in Awake(). and create Nodes and Edges(Relationship) while while receiving the neo4j data.

Backend:

  • SimpleGraphBackend.cs : extend AbstractGraphBackend.cs Interface.
  • SimpleGraphEdge.cs : extend AbstractGraphEdge.cs Interface.
  • SimpleGraphNode.cs : extend AbstractGraphNode.cs Interface.
  • Graph.cs : extend GraphBackendListener.cs .define NewNode and NewEdge
  • GraphScene.cs : set nodes distance by updating SpringJoint Rigidbody SphereCollider component
  • NodeComponent.cs : extend AbstractSceneComponent.cs Interface. Initial Node gameObject.
  • EdgeComponent.cs : extend AbstractSceneComponent.cs Interface. Set LineRenderer between 2 Node gameObjects.
  • ForceDirectedGraphLayout.cs : Calculate Attraction,Repulsion,Gravity physics force between nodes.

About

Force Directed Graph in Unity with Neo4j movie sample Dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%