Visualize mnemonica type hierarchies with interactive D3 force-directed graphs in VS Code.
- Interactive Graph Visualization: See your mnemonica type inheritance as a force-directed graph
- 2D/3D Toggle: Switch between 2D force-directed layout and 3D WebGL visualization
- Click to Definition: Single-click any node to view its properties, double-click to jump to source definition
- Hover for Details: View type properties on hover (name, depth, property list with types)
- Real-time Updates: Automatically refreshes when you modify source files
- Zoom & Pan: Navigate large type hierarchies easily
- Draggable Nodes: Drag nodes in 2D mode to rearrange the layout
- VS Code 1.74.0 or higher
- A TypeScript project using mnemonica
- Optionally: @mnemonica/tactica for enhanced type analysis
- Open a project with mnemonica types
- Run
Mnemonica: Show Type Graphfrom the command palette - Or right-click any
.tsfile and selectShow Type Graph
The graph will display:
- Nodes: Each mnemonica type defined in your project
- Links: Inheritance relationships (parent → child)
- Node Size: Based on number of properties
- Node Color: Based on depth in the inheritance tree
| Command | Description |
|---|---|
Mnemonica: Show Type Graph |
Open the type hierarchy visualization |
Mnemonica: Refresh Type Graph |
Manually refresh the graph |
Toggle 2D/3D |
Switch between 2D and 3D visualization modes |
- Hover: View type properties tooltip
- Single Click: Pin tooltip with full property details
- Double Click: Jump to source definition
- Drag: Rearrange node positions
- Scroll: Zoom in/out
- Right-click drag: Pan the view
- Click: Select node and view properties
- Double Click: Jump to source definition
- Drag: Rotate the 3D view
- Scroll: Zoom in/out
{
"mnemographica.layout": "force",
"mnemographica.nodeSize": "propertyCount",
"mnemographica.showProperties": true
}Mnemonica Graphica parses your TypeScript files to find define() calls and builds a visual representation of the instance inheritance trie - the "family tree" of types created through mnemonica's prototype chain inheritance pattern.
npm install
npm run compile
# Press F5 to launch extension hostMIT