@@ -46,34 +46,61 @@ https://user-images.githubusercontent.com/3120367/206125010-bd1fea8e-248a-43e7-8
46
46
## What does D2 look like?
47
47
48
48
``` d2
49
- # Actors
50
- hans: Hans Niemann
51
-
52
- defendants: {
53
- mc: Magnus Carlsen
54
- playmagnus: Play Magnus Group
55
- chesscom: Chess.com
56
- naka: Hikaru Nakamura
57
-
58
- mc -> playmagnus: Owns majority
59
- playmagnus <-> chesscom: Merger talks
60
- chesscom -> naka: Sponsoring
49
+ vars: {
50
+ d2-config: {
51
+ layout-engine: elk
52
+ # Terminal theme code
53
+ theme-id: 300
54
+ }
55
+ }
56
+ network: {
57
+ cell tower: {
58
+ satellites: {
59
+ shape: stored_data
60
+ style.multiple: true
61
+ }
62
+
63
+ transmitter
64
+
65
+ satellites -> transmitter: send
66
+ satellites -> transmitter: send
67
+ satellites -> transmitter: send
68
+ }
69
+
70
+ online portal: {
71
+ ui: {shape: hexagon}
72
+ }
73
+
74
+ data processor: {
75
+ storage: {
76
+ shape: cylinder
77
+ style.multiple: true
78
+ }
79
+ }
80
+
81
+ cell tower.transmitter -> data processor.storage: phone logs
82
+ }
83
+
84
+ user: {
85
+ shape: person
86
+ width: 130
61
87
}
62
88
63
- # Accusations
64
- hans -> defendants: 'sueing for $100M'
89
+ user -> network.cell tower: make call
90
+ user -> network.online portal.ui: access {
91
+ style.stroke-dash: 3
92
+ }
93
+
94
+ api server -> network.online portal.ui: display
95
+ api server -> logs: persist
96
+ logs: {shape: page; style.multiple: true}
65
97
66
- # Claim
67
- defendants.naka -> hans: Accused of cheating on his stream
68
- defendants.mc -> hans: Lost then withdrew with accusations
69
- defendants.chesscom -> hans: 72 page report of cheating
98
+ network.data processor -> api server
70
99
```
71
100
72
101
> There is syntax highlighting with the editor plugins linked below.
73
102
74
- <img src =" ./docs/assets/syntax.png " alt =" D2 render example " />
75
-
76
- > Rendered with the TALA layout engine.
103
+ <img src =" ./docs/assets/example.svg " alt =" D2 render example " />
77
104
78
105
> For more examples, see [ ./docs/examples] ( ./docs/examples ) .
79
106
0 commit comments