-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.py
58 lines (52 loc) · 1.89 KB
/
table.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from graphviz import Digraph
dot = Digraph(comment='Project Structure')
# Define Nodes
nodes = {
"App": "Main Router handling navigation across the app",
"3DForest": "Main hub for linking 3D modules to the canvas and managing object positions, sizes, shapes, etc.",
"Components": "Core functional and rendering components",
"Models": "3D Models for objects",
"ChangeDayNight": "Day/Night cycle control",
"FaunaGenerator": "Animal spawner",
"FPV": "First-person view control",
"Ground": "Ground environment",
"TimeTravel": "Time travel logic",
"ForestGenerator": "Forest rendering",
"Navigation": "Navigation components",
"Hooks": "Global app logic hooks",
"Login": "User Authentication and Login flow",
"Register": "Account registration",
"SaveForest": "Educational game for sustainable future actions, with interactive gameplay",
"StaticAssets": "Models, Textures, Images, CSS",
"CompCSS": "Component-based styles",
"Textures": "Texture files",
"Cart": "Cart model",
"HorseKart": "Horse cart model",
"Deer": "Deer model",
"Dog": "Dog model",
"EntryCircle": "Navigation with links"
}
# Adding nodes to the graph
for node, desc in nodes.items():
dot.node(node, f"{node}\n{desc}")
# Define Relationships
relationships = [
("App", "3DForest"),
("3DForest", "Components"),
("3DForest", "Models"),
("Components", "ChangeDayNight"),
("Components", "FaunaGenerator"),
("Components", "FPV"),
("Components", "Ground"),
("Components", "TimeTravel"),
("Components", "ForestGenerator"),
("Navigation", "Login"),
("Navigation", "Register"),
("StaticAssets", "CompCSS"),
("StaticAssets", "Textures"),
]
# Adding edges to represent relationships
for source, target in relationships:
dot.edge(source, target)
# Save and render the graph
dot.render('project_structure', format='png', cleanup=True)