Mermaid 3D Visualization
Mermaid has become the de facto standard for technical teams to quickly draw architecture diagrams, flowcharts, and state diagrams. Traditional Mermaid diagrams are only presented in 2D. The iCraft Editor provides a Mermaid 3D Visualization feature that converts standard Mermaid diagrams into true 3D interactive scenes in the editor with one click, making communication, presentation, and decision-making more efficient and intuitive.
Key Capabilities
Supported main diagram types Native parsing for
architecture、flowchart-v2、stateDiagram、sequenceDiagramStyle Mapping Automatically maps Mermaid styles such as fill color, stroke color, text color, and line width into the 3D scene.
True 3D Elements Supports rendering nodes as planes, cubes, cylinders, spheres, polygons, and models from the 3D model library, with materials and shadows.
Automatic Camera Perspective The editor automatically calculates camera position and tilt perspective based on the overall bounding box of the diagram, allowing the scene to be ready for viewing immediately.
Layered Grouping and Labels Groups are organized in vertical layers, and labels are aligned for improved readability.
Connections and Arrows Supports curved routing, single or double arrows, dashed lines, and other visual styles.
Traceable Relationships Nodes record their associated connections, making it easy to interactively select nodes and highlight related edges.
Intelligent Model Matching For
architecturediagrams, the system automatically matches icon tags with models in the 3D asset library, creating more expressive visuals.
Architecture
It is recommended to use architecture-beta when writing architecture diagrams.
Combined with iCraft’s 3D mapping, it allows you to quickly generate professional 3D architecture scenes from text.
For flowchart and stateDiagram, Mermaid syntax already contains style definitions. Therefore, iCraft will render the 3D visualization based on Mermaid’s style rules, rather than automatically matching the 3D model library.
Syntax Overview
Group
group GroupID(icon)[Title]optional[in ParentGroupID]Service / Component
service ComponentID(icon)[Title]optionalin GroupIDEdge
SourceID:Side -- Side:TargetIDSides:T/B/L/R; arrows:-->,<--,<-->Cross-group connection
SourceID{group}:Side --> Side:TargetID{group}Used to create connections between nodes in different groups.Junction
junction JunctionIDUsed with multiple edges to create four-way branching connections.
Example Code
Icon Identifier as 3D Model Name
In iCraft, the icon identifier is directly mapped to the name of a model in the built-in 3D model library (case-insensitive).
This allows a 2D placeholder icon to be automatically replaced by a corresponding 3D model.
Recommended to use short names that match the model library, such as Server、Database、Storage、Gateway、Cloud、Internet、Redis
Examples
service app(server)[App Server]→ rendered as 3D server modelservice db(database)[Database]→ rendered as 3D database modelservice storage(disk)[Storage]→ rendered as 3D storage modelservice gateway(internet)[Gateway]→ rendered as 3D network/gateway model
If the
icondoes not match any model in the library, it automatically falls back to a cube.()defines the icon or component type.[]defines the display title. These two elements can be configured independently.
Reference
Mermaid Architecture Beta Syntax: https://mermaid.js.org/syntax/architecture.html
Result

Flowchart
Syntax Overview
Direction:
graph TD,LR,TB,RLNode shapes:
A[rect],B([rounded]),C((circle)),D{diamond}Connections:
A --> B,A ==> B,A -- text --> BEdge style:
linkStyle indexList propertiesClass style:
classDef name properties; class nodeList nameSubgraph:
subgraph title ... end
Reference:
Mermaid flowchart Syntax: https://mermaid.js.org/syntax/flowchart.html
Example Code
Result

StateDiagram
Syntax Overview
Direction:
direction TB,LRInitial / final:
[*] --> State,State --> [*]Transition:
A --> B,A --> B: labelAccessibility:
accTitle,accDescrClass style:
classDef name properties; class stateList name
Reference:
Mermaid stateDiagram Syntax: https://mermaid.js.org/syntax/stateDiagram.html
Example Code:
Styles above (such as class, arrows) are automatically parsed and mapped to visual effects in the 3D scene, including color, connections, arrows, materials, and shadows.
Result

SequenceDiagram
Syntax Overview
Participants:
participant name [as alias],actor name [as alias](actor appears as a human icon)Message arrows:
-->solid arrow (sync, no activation)->>solid arrow (sync)-->>dashed arrow (return)-)solid arrow (async, no tail)->solid arrow (async)
Message:
sender[arrow]receiver: label textNote:
Note left/right/over participant: text,Note over A,B: textLoop / condition:
loop [label]: ... endalt [label]: ... else [label]: ... endopt [label]: ... endpar [label]: ... and [label]: ... end(parallel)
Background highlight:
rect rgb(r,g,b) ... endAccessibility:
accTitle: title,accDescr: description
Example Code
Result

Last updated