Skip to content

Commit 07fb0ad

Browse files
committed
Create github workflow to export drawio files to SVG to have README docs in sync with current design.
1 parent ab60a32 commit 07fb0ad

3 files changed

Lines changed: 123 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Export Draw.io Diagrams
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/diagrams/*.drawio'
7+
- '.github/workflows/drawio-export.yml'
8+
workflow_dispatch: # Allow manual trigger
9+
10+
jobs:
11+
export-diagrams:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Full history for proper commits
21+
22+
- name: Export Draw.io files to SVG
23+
uses: rlespinasse/drawio-export-action@v2
24+
with:
25+
path: docs/diagrams
26+
format: svg
27+
transparent: true
28+
action-mode: all
29+
remove-page-suffix: true
30+
31+
- name: Commit exported SVGs
32+
run: |
33+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
34+
git config --local user.name "github-actions[bot]"
35+
git add docs/diagrams/*.svg || true
36+
if ! git diff --staged --quiet; then
37+
git commit -m "Update exported diagrams [skip ci]"
38+
fi
39+
40+
- name: Push changes
41+
uses: ad-m/github-push-action@master
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
branch: ${{ github.ref }}

docs/diagrams/architecture.drawio

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.3.6 Chrome/140.0.7339.249 Electron/38.8.0 Safari/537.36" version="29.3.6">
2+
<diagram name="Page-1" id="UAaQjKQUHxjWdsgGKfFB">
3+
<mxGraphModel dx="1780" dy="1053" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-5" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-1" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=none;endFill=0;startArrow=blockThin;startFill=1;" target="beTZ2ZbazV9wxhCgPUfS-4">
8+
<mxGeometry relative="1" as="geometry" />
9+
</mxCell>
10+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-20" connectable="0" parent="beTZ2ZbazV9wxhCgPUfS-5" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Window sends screen size (for perspective matrix)" vertex="1">
11+
<mxGeometry relative="1" x="0.0665" as="geometry">
12+
<mxPoint as="offset" />
13+
</mxGeometry>
14+
</mxCell>
15+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-1" parent="1" style="html=1;whiteSpace=wrap;sketch=1;curveFitting=1;jiggle=2;labelBackgroundColor=none;fillColor=#A8DADC;strokeColor=#457B9D;fontColor=#1D3557;" value="&lt;font face=&quot;Architects Daughter&quot;&gt;Window&lt;/font&gt;" vertex="1">
16+
<mxGeometry height="50" width="110" x="430" y="140" as="geometry" />
17+
</mxCell>
18+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-7" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-6" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=diamondThin;endFill=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;startSize=12;endSize=12;" target="beTZ2ZbazV9wxhCgPUfS-4">
19+
<mxGeometry relative="1" as="geometry">
20+
<mxPoint x="450" y="390" as="targetPoint" />
21+
</mxGeometry>
22+
</mxCell>
23+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-4" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;labelBackgroundColor=none;fillColor=#A8DADC;strokeColor=#457B9D;fontColor=#1D3557;" value="Scene" vertex="1">
24+
<mxGeometry height="50" width="110" x="420" y="300" as="geometry" />
25+
</mxCell>
26+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-6" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Shader" vertex="1">
27+
<mxGeometry height="50" width="110" x="640" y="500" as="geometry" />
28+
</mxCell>
29+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-9" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-8" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=diamondThin;endFill=1;startSize=12;endSize=12;" target="beTZ2ZbazV9wxhCgPUfS-4">
30+
<mxGeometry relative="1" as="geometry" />
31+
</mxCell>
32+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-21" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-8" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=none;endFill=0;startArrow=classicThin;startFill=1;" target="beTZ2ZbazV9wxhCgPUfS-1">
33+
<mxGeometry relative="1" as="geometry" />
34+
</mxCell>
35+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-22" connectable="0" parent="beTZ2ZbazV9wxhCgPUfS-21" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="updates camera&amp;nbsp;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(29, 53, 87), rgb(176, 196, 226));&quot;&gt;location/orientation&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(29, 53, 87), rgb(176, 196, 226));&quot;&gt;with keyboard and&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(29, 53, 87), rgb(176, 196, 226));&quot;&gt;mouse I/O&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;" vertex="1">
36+
<mxGeometry relative="1" x="-0.0689" y="2" as="geometry">
37+
<mxPoint as="offset" />
38+
</mxGeometry>
39+
</mxCell>
40+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-8" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Camera" vertex="1">
41+
<mxGeometry height="50" width="110" x="210" y="490" as="geometry" />
42+
</mxCell>
43+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-16" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-10" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=diamondThin;endFill=1;startSize=12;endSize=12;" target="beTZ2ZbazV9wxhCgPUfS-4">
44+
<mxGeometry relative="1" as="geometry" />
45+
</mxCell>
46+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-10" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Model" vertex="1">
47+
<mxGeometry height="50" width="110" x="440" y="490" as="geometry" />
48+
</mxCell>
49+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-13" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-11" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=diamondThin;endFill=1;startSize=12;endSize=12;" target="beTZ2ZbazV9wxhCgPUfS-10">
50+
<mxGeometry relative="1" as="geometry" />
51+
</mxCell>
52+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-11" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Mesh" vertex="1">
53+
<mxGeometry height="50" width="110" x="340" y="650" as="geometry" />
54+
</mxCell>
55+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-15" edge="1" parent="1" source="beTZ2ZbazV9wxhCgPUfS-12" style="rounded=0;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;endArrow=diamondThin;endFill=1;startSize=12;endSize=12;" target="beTZ2ZbazV9wxhCgPUfS-10">
56+
<mxGeometry relative="1" as="geometry" />
57+
</mxCell>
58+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-12" parent="1" style="html=1;whiteSpace=wrap;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;strokeColor=#457B9D;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;fillColor=#A8DADC;" value="Texure" vertex="1">
59+
<mxGeometry height="50" width="110" x="540" y="650" as="geometry" />
60+
</mxCell>
61+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-17" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;rounded=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;" value="&lt;b&gt;NOTE:&lt;/b&gt;&amp;nbsp;More than likely the shader class is going to be decoupled from the scene (I should be able to choose which shader I&#39;m using at a given time to draw a scene). RIght now this is a simple approach due to some coupling with uniform naming that is set from inside the model.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;&quot;&gt;Will be fixed once I find a more univeral uniform naming convention. Or how uniforms are generically handled without all this coupling.&amp;nbsp;&lt;/div&gt;" vertex="1">
62+
<mxGeometry height="180" width="250" x="780" y="480" as="geometry" />
63+
</mxCell>
64+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-18" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;rounded=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;" value="This is a light wrapper aroudn a GLFW window, which is more than actually just a window for viewing renders. This class is also responsible for handling mouse and keyboard I/O provided by the GLFW window object.&amp;nbsp;" vertex="1">
65+
<mxGeometry height="90" width="220" x="585" y="130" as="geometry" />
66+
</mxCell>
67+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-19" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;rounded=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;" value="The scene object is pretty much just encapsulating the classes bellow with some extra fields, such as the model transformation matrix, and maybe some parameters for background color, light objects, etc...." vertex="1">
68+
<mxGeometry height="60" width="210" x="550" y="300" as="geometry" />
69+
</mxCell>
70+
<mxCell id="beTZ2ZbazV9wxhCgPUfS-23" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontColor=#1D3557;" value="&lt;h1&gt;renderer2 arhitecture&lt;/h1&gt;" vertex="1">
71+
<mxGeometry height="60" width="280" x="420" y="30" as="geometry" />
72+
</mxCell>
73+
</root>
74+
</mxGraphModel>
75+
</diagram>
76+
</mxfile>

docs/diagrams/export/architecture.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)