From f1d01cf7f09e5c5ab94cbfa2e0916c520293b1d1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 12 Nov 2022 10:03:32 -0800 Subject: [PATCH] 2022-11-12 10:03:32AM --- README.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f4f5f7148..fcf08eeac 100644 --- a/README.md +++ b/README.md @@ -136,24 +136,25 @@ more. Good language tooling is necessary for creating and maintaining large diag The extensions for VSCode and Vim can be found in the [Related](#related) section. -## Layout engine +## Plugins -D2 currently uses the open-source library [dagre](https://github.com/dagrejs/dagre) as its -default layout engine. D2 includes a wrapper around dagre to work around one of its -biggest limitations -- the inability to make container-to-container edges. +D2 is designed to be extensible and composable. The plugin system allows you to +change out layout engines and customize the rendering pipeline. Plugins can either be +bundled with the build or separately installed as a standalone binary. -Dagre was chosen due to its popularity in other tools, but D2 intends to integrate with a -variety of layout engines, e.g. `dot`, as well as single-purpose layout types like -sequence diagrams. You can choose whichever layout engine you like and works best for the -diagram you're making. +**Layout engines**: -Terrastruct has created a proprietary layout engine called -[TALA](https://terrastruct.com/tala). It has been designed specifically for software -architecture diagrams, though it's good for other domains too. TALA has many advantages -over other layout engines, the biggest being that it isn't constrained to hierarchies, or -any single type like "radial" or "tree" (as almost all layout engines are). For more -information and to download & try TALA, see -[https://github.com/terrastruct/TALA](https://github.com/terrastruct/TALA). +- [dagre](https://github.com/dagrejs/dagre) (default, bundled): A fast, directed graph + layout engine that produces layered/hierarchical layouts. Based on Graphviz's DOT + algorithm. +- [ELK](https://github.com/kieler/elkjs) (bundled): A directed graph layout engine + particularly suited for node-link diagrams with an inherent direction and ports. +- [TALA](https://github.com/terrastruct/TALA) (binary): Novel layout engine designed + specifically for software architecture diagrams. + +D2 intends to integrate with a variety of layout engines, e.g. `dot`, as well as +single-purpose layout types like sequence diagrams. You can choose whichever layout engine +you like and works best for the diagram you're making. ## Comparison @@ -189,6 +190,8 @@ Copyright © 2022 Terrastruct, Inc. Open-source licensed under the Mozilla Publi - Does D2 collect telemetry? - No, D2 does not use an internet connection after installation, except to check for version updates from Github periodically. +- Does D2 need a browser to run? + - No, D2 can run entirely server-side. - I have a question or need help. - The best way to get help is to open an Issue, so that it's searchable by others in the future. If you prefer synchronous or just want to chat, you can pop into the help