61 lines
1,010 B
Text
61 lines
1,010 B
Text
input: |d2
|
|
# D2 script
|
|
hello -> world
|
|
|
|
|
|
|
input -> compiler
|
|
|
|
compiler: {
|
|
width: 300
|
|
height: 100
|
|
style: {
|
|
fill: "#7B90D2"
|
|
font-color: white
|
|
}
|
|
}
|
|
|
|
compiler -> graph
|
|
graph: Graph\n(shapes & connections) {
|
|
shape: oval
|
|
style.fill: "#A8D8B9"
|
|
}
|
|
|
|
configs -> graph mods
|
|
|
|
graph -> graph mods -> layout
|
|
|
|
|
|
# Set Dimensions -> Use ruler to measure all texts -> measured graph
|
|
# Set Dimensions -> Use given, premeasured dimensions -> measured graph
|
|
|
|
# measured graph: {
|
|
# shape: oval
|
|
# style.fill: honeydew
|
|
# }
|
|
#
|
|
# measured graph -> layout engine -> positioned graph
|
|
#
|
|
# positioned graph: {
|
|
# shape: oval
|
|
# style.fill: honeydew
|
|
# }
|
|
#
|
|
# positioned graph -> exporter -> diagram
|
|
#
|
|
# diagram: finalized diagram (styled) {
|
|
# shape: oval
|
|
# style.fill: honeydew
|
|
# }
|
|
#
|
|
# diagram -> render SVG
|
|
#
|
|
# render SVG -> use sketch post processor: optional
|
|
#
|
|
# use sketch post processor -> SVG bytes
|
|
#
|
|
# SVG bytes: {
|
|
# shape: oval
|
|
# style.fill: honeydew
|
|
# }
|
|
#
|
|
# SVG bytes -> screenshot for PNG: optional
|