3 ms·
At least for the layering + using text aspect, D2 support this: defining diagrams as multiple layers like so x -> y layers: { inside_x: { a ->
by alixanderwang 1y ago
At least for the layering + using text aspect, D2 support this:
defining diagrams as multiple layers like so
x -> y
layers: {
inside_x: {
a -> b
}
}
A fleshed out example hosted on our web service: https://app.terrastruct.com/diagrams/664641071 https://app.terrastruct.com/diagrams/664641071
- aitchnyu 1y agoWonder why Mermaid has more hype than this.
- nullify88 1y agoWhoa as an infrastructure guy I had always dreamed of diagrams like this. And while I've used Miro and some OSS homebrew stuff, nothing was as polished as this. Well done.
- 9dev 1y agoTerrastruct looks really nice, and kind of like a 2D version of the 3D thing I'm thinking of; if you could attach key-value properties to nodes and vertices, and had different rendering modes that made use of any of these properties to render the item differently, that would probably be pretty close. For example, a layer that displays a physical network might only consider vertices with a `kind` attribute of "physical link"; that limits the layer to all nodes with a matching vertex between them, and the layer would also only display those attributes of the nodes relevant for the current view. Does that make sense?
- alixanderwang 1y agoYeah we do this with globs. a.class: backend b.class: frontend # hide everything **: suspend layers: { backend: { # show backend stuff **: unsuspend { &class: backend } } } see more here: https://d2lang.com/blog/c4/ https://d2lang.com/blog/c4/